<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>档案管理系统</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">

    <link rel="stylesheet" href="/static/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="/static/dist/css/font-awesome.min.css">
    <link rel="stylesheet" href="/static/dist/css/ionicons.min.css">
    <link rel="stylesheet" href="/static/dist/css/AdminLTE.min.css">
    <link rel="stylesheet" href="/static/dist/css/skins/all-skins.min.css">
    <link rel="stylesheet" href="/static/css/bootstrap-treeview.css">
    <link rel="stylesheet" href="/static/css/bootstrapValidator.min.css">
    <link rel="stylesheet" href="/static/css/bootstrap-table.min.css">
    <link rel="stylesheet" href="/static/layer/theme/default/layer.css">
    <link rel="stylesheet" href="/static/css/viewer.min.css">
    <link rel="stylesheet" href="/static/css/bootstrap-table-jumpto.css">
    <link rel="stylesheet" href="/static/webCss/wdjy.css?v=shujubuwqd12138">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="/static/plugins/ie9/html5shiv.min.js"></script>
    <script src="/static/plugins/ie9/respond.min.js"></script>
    <![endif]-->
</head>
<body class="hold-transition skin-blue" style="font-size: medium">


<div class="content " id="yhgl">
    <div class="row">
        <div class="modal" id="lxxzModal" data-backdrop="static" >
            <div class="modal-dialog" style="height: 500px">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title">选择档案类型</h4>
                    </div>
                    <div class="modal-body">
                        <div id="lxTree"></div>
                    </div>
                    <div class="modal-footer">
                        <!--<button type="button" class="btn btn-default pull-left" data-dismiss="modal" @click="close">关闭</button>-->
                        <!--<button @click="sureLxSelect" type="button" class="btn btn-primary">确认选择</button>-->
                    </div>
                </div>
                <!-- /.modal-content -->
            </div>
            <!-- /.modal-dialog -->
        </div>

        <div class="modal" id="jydjDiv" data-backdrop="static">
            <div class="modal-dialog" style="width: 800px;height: 600px">
                <!--<span class="btn btn-primary" data-original=""></span>-->
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title">请选择要借阅的档案</h4>
                    </div>
                    <div class="modal-body row">
                        <div class="text-center" v-show="isExitcl">
                            该档案没有材料信息
                        </div>
                        <div class="col-xs-8 col-xs-offset-2" style="height:500px;overflow:auto"  v-show="!isExitcl">
                            <div id="dadjtree"></div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <div class="text-center">
                            <button type="button" class="btn btn-primary" @click="suredj" style="width: 94px;height: 36px;background-color: #2C72E8">确定</button>
                            <button type="button" class="btn btn-default" @click="canceldj" style="width: 94px;height: 36px">取消</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="modal" id="jydaDiv" data-backdrop="static">
            <div id="tree2">
                <img id="tree2Img" dataUrl="http://211.159.186.65:33333/api/fj/downloadFj?type=1&fileName=1590982068983.jpg">
            </div>
            <div class="modal-dialog" style="width: 1100px;height: 600px">
                <!--<span class="btn btn-primary" data-original=""></span>-->
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title">档案查看</h4>
                    </div>
                    <div class="modal-body row">
                        <div class="col-xs-5" style="overflow:auto;height: 600px">
                            <p3>材料信息</p3>
                            <div id="tree"></div>
                            <div class=" text-center" style="padding: 10px">
                                <!--<button type="button" class="btn btn-primary btn-xs" @click="printWj">打印选中文件</button>-->
                                <button type="button" class="btn btn-primary btn-xs" @click="downloadWj">下载选中文件</button>
                            </div>
                        </div>
                        <div class="col-xs-5">
                            <p3>档案信息</p3>
                        </div>
                        <div class="col-xs-7" style="overflow:auto;height: 900px">
                            <div class="box-body row">
                                <div class="nav-tabs-custom">
                                    <!-- Tabs within a box -->
                                    <ul class="nav nav-tabs pull-right">
                                        <!--<li class="active"><a href="#revenue-chart" data-toggle="tab">Area</a></li>-->
                                        <!--<li><a href="#sales-chart" data-toggle="tab">Donut</a></li>-->
                                        <li class="pull-left header" style="color: #00a7d0"><i class="fa fa-inbox"></i> 基本信息</li>
                                    </ul>
                                    <div class="tab-content no-padding">
                                        <!-- Morris chart - Sales -->
                                        <div class="chart tab-pane active" style="position: relative">
                                            <div class="row">
                                                <div class="form-group col-xs-6">
                                                    <label>档案类型</label>
                                                    <div>
                                                        <div class="input-group">
                                                            <input name="typeName" type="text" class="form-control input-sm" v-model="gdxx.typeName" readonly>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="form-group col-xs-6">
                                                    <label>档案编号</label>
                                                    <div class="input-group">
                                                        <input name="dabh" v-model="gdxx.dabh" type="text" class="form-control input-sm" readonly>
                                                    </div>
                                                </div>
                                                <div class="form-group col-xs-6">
                                                    <label>年份</label>
                                                    <input v-model="gdxx.year" name="year" type="text" class="form-control input-sm" readonly>
                                                </div>
                                                <div class="form-group col-xs-6">
                                                    <label>项目名称</label>
                                                    <input v-model="gdxx.xmmc" name="xmmc" type="text" class="form-control input-sm" readonly>
                                                </div>
                                                <div class="form-group col-xs-6">
                                                    <label>顺序号</label>
                                                    <input v-model="gdxx.sxh" name="lb" type="text" class="form-control input-sm" readonly>
                                                </div>
                                                <div class="form-group col-xs-6">
                                                    <label>大厅受理编号</label>
                                                    <input v-model="gdxx.dtslbh" name="dtslbh" type="text" class="form-control input-sm" readonly>
                                                </div>
                                                <div class="form-group col-xs-6">
                                                    <label>原盒号</label>
                                                    <input v-model="gdxx.yhh" name="yhh" type="text" class="form-control input-sm" readonly>
                                                </div>
                                                <div class="form-group col-xs-6">
                                                    <label>页数</label>
                                                    <input v-model="gdxx.ys" name="ys" type="text" class="form-control input-sm" readonly>
                                                </div>
                                            </div>

                                        </div>
                                        <!--<div class="chart tab-pane" id="sales-chart" style="position: relative; height: 300px;"></div>-->
                                    </div>
                                </div>
                                <div class="nav-tabs-custom">
                                    <!-- Tabs within a box -->
                                    <ul class="nav nav-tabs pull-right">
                                        <!--<li class="active"><a href="#revenue-chart" data-toggle="tab">Area</a></li>-->
                                        <!--<li><a href="#sales-chart" data-toggle="tab">Donut</a></li>-->
                                        <li class="pull-left header" style="color: #00a7d0"><i class="fa fa-inbox"></i> 建设信息</li>
                                    </ul>
                                    <div class="tab-content no-padding">
                                        <!-- Morris chart - Sales -->
                                        <div class="chart tab-pane active" style="position: relative">
                                            <div class="row">
                                                <div class="form-group col-xs-6">
                                                    <label>建设单位</label>
                                                    <input v-model="gdxx.jsdw" name="jsdw" type="text" class="form-control input-sm" readonly>
                                                </div>
                                                <div class="form-group col-xs-6">
                                                    <label>建设位置</label>
                                                    <input v-model="gdxx.jswz" name="jswz" type="text" class="form-control input-sm" readonly>
                                                </div>
                                                <div class="form-group col-xs-6">
                                                    <label>建设项目选址意见书时间</label>
                                                    <input v-model="gdxx.jsxmxzyjssj" name="jswz" type="text" class="form-control input-sm" readonly>
                                                </div>
                                                <div class="form-group col-xs-6">
                                                    <label>建设用地规划许可证时间</label>
                                                    <input v-model="gdxx.jsydghxkzsj" name="jsydghxkzsj" type="text" class="form-control input-sm" readonly>
                                                </div>
                                                <div class="form-group col-xs-6">
                                                    <label >建设工程规划许可证时间</label>
                                                    <input v-model="gdxx.jsgcghxkzsj" name="jsgcghxkzsj" type="text" class="form-control input-sm" readonly>
                                                </div>
                                                <div class="form-group col-xs-6">
                                                    <label>建设工程竣工规划验收合格证时间</label>
                                                    <input v-model="gdxx.jsgcjgghyshgsj" name="jsgcjgghyshgsj" type="text" class="form-control input-sm" readonly>
                                                </div>
                                                <div class="form-group col-xs-6">
                                                    <label>建设工程施工许可证时间</label>
                                                    <input v-model="gdxx.jsgcsgxkzsj" name="jsgcsgxkzsj" type="text" class="form-control input-sm" readonly>
                                                </div>
                                                <div class="form-group col-xs-6">
                                                    <label>建设工程施工许可证编号</label>
                                                    <input v-model="gdxx.jsgcsgxkzbh" name="jsgcsgxkzbh" type="text" class="form-control input-sm" readonly>
                                                </div>
                                            </div>
                                        </div>
                                        <!--<div class="chart tab-pane" id="sales-chart" style="position: relative; height: 300px;"></div>-->
                                    </div>
                                </div>
                                <div class="nav-tabs-custom">
                                    <!-- Tabs within a box -->
                                    <ul class="nav nav-tabs pull-right">
                                        <!--<li class="active"><a href="#revenue-chart" data-toggle="tab">Area</a></li>-->
                                        <!--<li><a href="#sales-chart" data-toggle="tab">Donut</a></li>-->
                                        <li class="pull-left header" style="color: #00a7d0"><i class="fa fa-inbox"></i> 工程信息</li>
                                    </ul>
                                    <div class="tab-content no-padding">
                                        <!-- Morris chart - Sales -->
                                        <div class="chart tab-pane active" style="position: relative">
                                            <div class="row">
                                                <div class="form-group col-xs-6">
                                                    <label >工程项目名称</label>
                                                    <input v-model="gdxx.gcxmmc" name="gcxmmc" type="text" class="form-control input-sm" readonly>
                                                </div>
                                                <div class="form-group col-xs-6">
                                                    <label>工程建设规模</label>
                                                    <input v-model="gdxx.gcjsgm" name="gcjsgm" type="text" class="form-control input-sm" readonly>
                                                </div>
                                                <div class="form-group col-xs-6">
                                                    <label>工程竣工项目名称</label>
                                                    <input v-model="gdxx.gcjgxmmc" name="gcjgxmmc" type="text" class="form-control input-sm" readonly>
                                                </div>
                                                <div class="form-group col-xs-6">
                                                    <label>工程竣工建设规模</label>
                                                    <input v-model="gdxx.gcjgjsgm" name="gcjgjsgm" type="text" class="form-control input-sm" readonly>
                                                </div>
                                            </div>
                                        </div>
                                        <!--<div class="chart tab-pane" id="sales-chart" style="position: relative; height: 300px;"></div>-->
                                    </div>
                                </div>
                                <div class="nav-tabs-custom">
                                    <!-- Tabs within a box -->
                                    <ul class="nav nav-tabs pull-right">
                                        <!--<li class="active"><a href="#revenue-chart" data-toggle="tab">Area</a></li>-->
                                        <!--<li><a href="#sales-chart" data-toggle="tab">Donut</a></li>-->
                                        <li class="pull-left header" style="color: #00a7d0"><i class="fa fa-inbox"></i> 规划信息</li>
                                    </ul>
                                    <div class="tab-content no-padding">
                                        <!-- Morris chart - Sales -->
                                        <div class="chart tab-pane active" style="position: relative">
                                            <div class="row">
                                                <div class="form-group col-xs-6">
                                                    <label >规划项目名称</label>
                                                    <input v-model="gdxx.ghxmmc" name="ghxmmc" type="text" class="form-control input-sm" readonly>
                                                </div>
                                                <div class="form-group col-xs-6">
                                                    <label >规划用地面积</label>
                                                    <input v-model="gdxx.ghydmj" name="ghydmj" type="text" class="form-control input-sm" readonly>
                                                </div>
                                            </div>
                                        </div>
                                        <!--<div class="chart tab-pane" id="sales-chart" style="position: relative; height: 300px;"></div>-->
                                    </div>
                                </div>
                                <div class="nav-tabs-custom">
                                    <!-- Tabs within a box -->
                                    <ul class="nav nav-tabs pull-right">
                                        <!--<li class="active"><a href="#revenue-chart" data-toggle="tab">Area</a></li>-->
                                        <!--<li><a href="#sales-chart" data-toggle="tab">Donut</a></li>-->
                                        <li class="pull-left header" style="color: #00a7d0"><i class="fa fa-inbox"></i> 选址信息</li>
                                    </ul>
                                    <div class="tab-content no-padding">
                                        <!-- Morris chart - Sales -->
                                        <div class="chart tab-pane active" style="position: relative">
                                            <div class="row">
                                                <div class="form-group col-xs-6">
                                                    <label>选址项目名称</label>
                                                    <input v-model="gdxx.xzxmmc" name="xzxmmc" type="text" class="form-control input-sm" readonly>
                                                </div>
                                                <div class="form-group col-xs-6">
                                                    <label>选址用地面积</label>
                                                    <input v-model="gdxx.xzydmj" name="xzydmj" type="text" class="form-control input-sm" readonly>
                                                </div>
                                            </div>
                                        </div>
                                        <!--<div class="chart tab-pane" id="sales-chart" style="position: relative; height: 300px;"></div>-->
                                    </div>
                                </div>
                                <div class="nav-tabs-custom">
                                    <!-- Tabs within a box -->
                                    <ul class="nav nav-tabs pull-right">
                                        <!--<li class="active"><a href="#revenue-chart" data-toggle="tab">Area</a></li>-->
                                        <!--<li><a href="#sales-chart" data-toggle="tab">Donut</a></li>-->
                                        <li class="pull-left header" style="color: #00a7d0"><i class="fa fa-inbox"></i> 施工信息</li>
                                    </ul>
                                    <div class="tab-content no-padding">
                                        <!-- Morris chart - Sales -->
                                        <div class="chart tab-pane active" style="position: relative">
                                            <div class="row">
                                                <div class="form-group col-xs-6">
                                                    <label>施工工程名称</label>
                                                    <textarea v-model="gdxx.sggcmc" name="sggcmc" type="text" class="form-control input-sm" readonly></textarea>
                                                </div>
                                                <div class="form-group col-xs-6">
                                                    <label>施工建设规模</label>
                                                    <input v-model="gdxx.sgjsgm" name="sgjsgm" type="text" class="form-control input-sm" readonly>
                                                </div>
                                            </div>
                                        </div>
                                        <!--<div class="chart tab-pane" id="sales-chart" style="position: relative; height: 300px;"></div>-->
                                    </div>
                                </div>
                                <div class="nav-tabs-custom">
                                    <!-- Tabs within a box -->
                                    <ul class="nav nav-tabs pull-right">
                                        <!--<li class="active"><a href="#revenue-chart" data-toggle="tab">Area</a></li>-->
                                        <!--<li><a href="#sales-chart" data-toggle="tab">Donut</a></li>-->
                                        <li class="pull-left header" style="color: #00a7d0"><i class="fa fa-inbox"></i> 其他信息</li>
                                    </ul>
                                    <div class="tab-content no-padding">
                                        <!-- Morris chart - Sales -->
                                        <div class="chart tab-pane active" style="position: relative">
                                            <div class="row">
                                                <div class="form-group col-xs-6">
                                                    <label>项目通过时间</label>
                                                    <input v-model="gdxx.xmfatgsj" name="xmfatgsj" type="text" class="form-control input-sm" readonly>
                                                </div>

                                                <div class="form-group col-xs-6">
                                                    <label>档案存储位置</label>
                                                    <input v-model="gdxx.daccwz" name="daccwz" type="text" class="form-control input-sm" readonly>
                                                </div>
                                                <div class="form-group col-xs-6">
                                                    <label>超链接</label>
                                                    <input v-model="gdxx.clj" name="clj" type="text" class="form-control input-sm" readonly>
                                                </div>
                                                <div class="form-group col-xs-6">
                                                    <label>著录员</label>
                                                    <input v-model="gdxx.zly" name="zly" type="text" class="form-control input-sm" readonly>
                                                </div>
                                                <div class="form-group col-xs-6">
                                                    <label>著录时间</label>
                                                    <input v-model="gdxx.zlsj" name="zlsj" type="text" class="form-control input-sm" readonly>
                                                </div>
                                                <div class="form-group col-xs-6">
                                                    <label>其他</label>
                                                    <input v-model="gdxx.qt" name="qt" type="text" class="form-control input-sm" readonly>
                                                </div>
                                            </div>
                                        </div>
                                        <!--<div class="chart tab-pane" id="sales-chart" style="position: relative; height: 300px;"></div>-->
                                    </div>
                                </div>
                                <div class="nav-tabs-custom">
                                    <div class="tab-content no-padding">
                                        <!-- Morris chart - Sales -->
                                        <div class="chart tab-pane active" style="position: relative">
                                            <div class="row">
                                                <div class="form-group col-xs-12">
                                                    <label>备注</label>
                                                    <textarea v-model="gdxx.bz" name="bz" type="text" class="form-control input-sm" readonly></textarea>
                                                </div>
                                            </div>
                                        </div>
                                        <!--<div class="chart tab-pane" id="sales-chart" style="position: relative; height: 300px;"></div>-->
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="modal" id="jydawsDiv" data-backdrop="static">
            <div id="tree3">
                <img id="tree3Img" dataUrl="http://211.159.186.65:33333/api/fj/downloadFj?type=1&fileName=1590982068983.jpg">
            </div>
            <div class="modal-dialog" style="width: 1100px">
                <!--<span class="btn btn-primary" data-original=""></span>-->
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title">档案查看</h4>
                    </div>
                    <div class="modal-body row">
                        <div class="col-xs-5" style="overflow:auto;height: 500px">
                            <p3>材料信息</p3>
                            <div id="tree5"></div>
                            <div class=" text-center" style="padding: 10px">
                                <!--<button type="button" class="btn btn-primary btn-xs" @click="printWj">打印选中文件</button>-->
                                <button type="button" class="btn btn-primary btn-xs" @click="downloadWj">下载选中文件</button>
                            </div>
                            <!--<button type="button" onclick="printWj">打印</button>-->
                        </div>
                        <div class="col-xs-7">
                            <div class="box-body row">
                                <div class="nav-tabs-custom">
                                    <!-- Tabs within a box -->
                                    <ul class="nav nav-tabs pull-right">
                                        <!--<li class="active"><a href="#revenue-chart" data-toggle="tab">Area</a></li>-->
                                        <!--<li><a href="#sales-chart" data-toggle="tab">Donut</a></li>-->
                                        <li class="pull-left header" style="color: #00a7d0"><i class="fa fa-inbox"></i> 基本信息</li>
                                    </ul>
                                    <div class="tab-content no-padding">
                                        <!-- Morris chart - Sales -->
                                        <div class="chart tab-pane active" style="position: relative">
                                            <div class="row">
                                                <div class="form-group col-xs-6">
                                                    <label>档案类型</label>
                                                    <input name="typeName" type="text" class="form-control input-sm" v-model="wsxx.typeName"
                                                           readonly>
                                                </div>
                                                <div class="form-group col-xs-6">
                                                    <label>案卷题名</label>
                                                    <input readonly v-model="wsxx.wjmc" name="wjmc" type="text"
                                                           class="form-control input-sm">
                                                </div>
                                                <div class="form-group col-xs-6">
                                                    <label>档案编号</label>
                                                    <input readonly name="dabh" v-model="wsxx.dabh" type="text"
                                                           class="form-control input-sm">
                                                </div>

                                                <div class="form-group col-xs-6">
                                                    <label>单位名称</label>
                                                    <input readonly v-model="wsxx.dwmc" name="dwmc" type="text"
                                                           class="form-control input-sm">
                                                </div>
                                                <div class="form-group col-xs-6">
                                                    <label>年份</label>
                                                    <input readonly v-model="wsxx.nf" name="nf" type="text"
                                                           class="form-control input-sm">
                                                </div>
                                                <div class="form-group col-xs-6">
                                                    <label>时间</label>
                                                    <input readonly v-model="wsxx.sj" name="sj" type="text"
                                                           class="form-control input-sm">
                                                </div>
                                                <div class="form-group col-xs-6">
                                                    <label>页号</label>
                                                    <input readonly v-model="wsxx.yh" name="yh" type="text"
                                                           class="form-control input-sm">
                                                </div>
                                                <div class="form-group col-xs-6">
                                                    <label>页数</label>
                                                    <input readonly v-model="wsxx.ys" name="ys" type="text"
                                                           class="form-control input-sm">
                                                </div>
                                                <div class="form-group col-xs-6">
                                                    <label>总盒号</label>
                                                    <input readonly v-model="wsxx.zhh" name="zhh" type="text"
                                                           class="form-control input-sm">
                                                </div>
                                            </div>

                                        </div>
                                        <!--<div class="chart tab-pane" id="sales-chart" style="position: relative; height: 300px;"></div>-->
                                    </div>
                                </div>
                                <div class="nav-tabs-custom">
                                    <!-- Tabs within a box -->
                                    <ul class="nav nav-tabs pull-right">
                                        <!--<li class="active"><a href="#revenue-chart" data-toggle="tab">Area</a></li>-->
                                        <!--<li><a href="#sales-chart" data-toggle="tab">Donut</a></li>-->
                                        <li class="pull-left header" style="color: #00a7d0"><i class="fa fa-inbox"></i>备注</li>
                                    </ul>
                                    <div class="tab-content no-padding">
                                        <!-- Morris chart - Sales -->
                                        <div class="chart tab-pane active" style="position: relative">
                                            <div class="row">
                                                <div class="form-group col-xs-12">
                                                    <label>备注</label>
                                                    <textarea readonly v-model="wsxx.bz" name="qzh" type="text"
                                                              class="form-control input-sm">
                                    </textarea>
                                                </div>
                                            </div>
                                        </div>
                                        <!--<div class="chart tab-pane" id="sales-chart" style="position: relative; height: 300px;"></div>-->
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="modal" id="jydaDiv2" data-backdrop="static">
            <div class="modal-dialog" style="width: 800px">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title">档案借阅申请</h4>
                    </div>
                    <div class="modal-body row" style="height: 500px">
                        <div class="col-xs-5"  style="overflow:auto;height: 500px">
                            <div id="tree"></div>
                            <div class=" text-center" style="padding: 10px">
                                <button type="button" class="btn btn-primary btn-sm" @click="selectAll">全选</button>
                                <button type="button" class="btn btn-primary btn-sm" @click="selectNull">反选</button>
                            </div>
                        </div>
                        <div class="col-xs-7">
                            <form role="form" id="userForm">
                                <div class="form-inline col-xs-offset-3" style="margin-bottom: 20px;">
                                    <label>档案编号:</label>
                                    <label name="dabh" class="" style="width: 300px;">{{jyxx2.dabh}}</label>
                                </div>
                                <div class="form-inline col-xs-offset-3" style="margin-bottom: 20px">
                                    <label>案卷题名:</label>
                                    <label class="" name="damc" style="width: 300px;">{{jyxx2.damc}}</label>
                                </div>
                                <div class="form-inline col-xs-offset-3" style="margin-bottom: 20px">
                                    <label>大厅受理编号:</label>
                                    <label class="" name="dtslbh" style="width: 300px;">{{jyxx2.dtslbh}}</label>
                                </div>
                                <div class="form-inline col-xs-offset-3" style="margin-bottom: 20px">
                                    <label>借阅原因:</label>
                                    <textarea name="jyyy" v-model="jyxx2.jyyy" class="form-control" style="width: 300px;"></textarea>
                                </div>
                                <div class="form-inline col-xs-offset-3" style="margin-bottom: 20px">
                                    <label>借阅人:&nbsp&nbsp&nbsp</label>
                                    <input name="jyr" class="form-control" type="text" readonly v-model="jyxx2.jyr" style="width: 300px;">
                                </div>
                                <div class="form-inline col-xs-offset-3" style="margin-bottom: 20px">
                                    <label>审核人:&nbsp&nbsp&nbsp</label>
                                    <select name="shr" class="form-control" v-model="jyxx2.shrId" @change="shrChange" style="width: 300px;">
                                        <option v-for="(v,k) in allShy" :value="v.id">{{v.name}}</option>
                                    </select>
                                </div>
                                <div class="form-inline col-xs-offset-3" style="margin-bottom: 20px">
                                    <label>借阅时限:</label>
                                    <select name="jysx" class="form-control" v-model="jyxx2.jysx" style="width: 100px;">
                                        <option value="5">五天</option>
                                        <option value="10">十天</option>
                                        <option value="15">十五天</option>
                                        <option value="20">二十天</option>
                                        <option value="30">三十天</option>
                                    </select>
                                </div>
                            </form>
                        </div>
                    </div>
                    <div class=" text-center" style="padding: 10px">
                        <!--<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>-->
                        <button type="button" class="btn btn-primary" @click="doSq" style="width: 94px;height: 36px;background-color: #2C72E8">提交申请</button>
                        <button type="button" class="btn btn-default" @click="cancel" style="width: 94px;height: 36px">取消</button>
                    </div>
                </div>
                <!-- /.modal-content -->
            </div>
            <!-- /.modal-dialog -->
        </div>

        <div class="modal" id="pljydaDiv" data-backdrop="static">
            <div class="modal-dialog" style="width: 800px">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title">批量借阅申请</h4>
                    </div>
                    <div class="modal-body row" style="height: 500px">
                        <div>
                            <form role="form" id="plForm">
                                <div class="form-inline col-xs-offset-3" style="margin-bottom: 20px">
                                    <label>借阅原因:</label>
                                    <textarea name="jyyy" v-model="pljy.jyyy" class="form-control" style="width: 300px;"></textarea>
                                </div>
                                <div class="form-inline col-xs-offset-3" style="margin-bottom: 20px">
                                    <label>借阅人:&nbsp&nbsp&nbsp</label>
                                    <input name="jyr" class="form-control" type="text" readonly v-model="pljy.jyr" style="width: 300px;">
                                </div>
                                <div class="form-inline col-xs-offset-3" style="margin-bottom: 20px">
                                    <label>审核人:&nbsp&nbsp&nbsp</label>
                                    <select name="shr" class="form-control" v-model="pljy.shrId" @change="shrChange" style="width: 300px;">
                                        <option v-for="(v,k) in allShy" :value="v.id">{{v.name}}</option>
                                    </select>
                                </div>
                                <div class="form-inline col-xs-offset-3" style="margin-bottom: 20px">
                                    <label>借阅时限:</label>
                                    <select name="jysc" class="form-control" v-model="pljy.jysc" style="width: 100px;">
                                        <option value="5">五天</option>
                                        <option value="10">十天</option>
                                        <option value="15">十五天</option>
                                        <option value="20">二十天</option>
                                        <option value="30">三十天</option>
                                    </select>
                                </div>
                            </form>
                        </div>
                    </div>
                    <div class=" text-center" style="padding: 10px">
                        <!--<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>-->
                        <button type="button" class="btn btn-primary" @click="doSqpl" style="width: 94px;height: 36px;background-color: #2C72E8">提交申请</button>
                        <button type="button" class="btn btn-default" @click="cancelpl" style="width: 94px;height: 36px">取消</button>
                    </div>
                </div>
                <!-- /.modal-content -->
            </div>
            <!-- /.modal-dialog -->
        </div>

        <div id="addtool" class="btn-group form-inline">

        </div>

        <div v-show="mainShow">
            <div class="col-xs-12 row" style="height: 63px;padding-top: 0px;">
                <div class="btn-group form-inline col-xs-6" style="margin-top: 5px;width: 100%">
                    <div class="input-group" style="padding-right: 2%">
                        <span style="height: 34px" class="input-group-addon btn btn-primary" data-toggle="modal" @click="kjSelect">选择</span>
                        <input style="height: 34px" name="dalx" type="text" class="form-control input-sm" v-model="wdlxName" readonly placeholder="请选择档案类型">
                    </div>
                    <div class="input-group" style="padding-right: 12%">
                        <input type="text" class="form-control" placeholder="请输入关键字" v-model="keyword">
                        <span class="input-group-addon btn  btn-primary"  @click="cancelSearch"><i class="fa fa-search"></i></span>
                    </div>
                    <div class="input-group" style="padding-right: 10%">
                        <div style="margin-right: 18%;width: 54px">
                            <a class="btn cancelBtn" @click="goback"  v-show="!dalxShow">返回</a>
                        </div>
                    </div>
                    <div class="input-group" style="padding-left: 2%">
                        <label style="font-family: PingFang SC">档案借阅指南：</label>
                        <label style="background-color: #2770E8;width: 116px;height: 24px;color: #ffffff;text-align: center;border-radius:12px;font-size: 14px">档案快速检索</label>
                        <label style="width: 32px;height: 2px;background-color: #2770E8;margin: 0px;padding: 0px"></label>
                        <label style="width: 32px;height: 2px;background-color: #DADCE0;margin: 0px;padding: 0px"></label>
                        <label style="background-color: #2770E8;width: 94px;height: 24px;color: #ffffff;text-align: center;border-radius:12px;font-size: 14px;opacity:0.25;">借阅申请</label>
                        <label style="width: 64px;height: 2px;background-color: #DADCE0;margin: 0px;padding: 0px"></label>
                        <label style="background-color: #2770E8;width: 94px;height: 24px;color: #ffffff;text-align: center;border-radius:12px;font-size: 14px;opacity:0.25;">查看档案</label>
                    </div>
                </div>
            </div>
            <div class="col-xs-6" style="border: #F4F6FA 10px solid;border-bottom: #ffffff;border-left: 0px!important;border-right: 0px!important;">
                <div v-show="dalxShow">
                    <table class="table table-bordered table-hover text-center" id="dalxTable">

                    </table>
                </div>
                <div v-show="!dalxShow">
                    <div class="col-xs-12" style="overflow:auto;height: 670px;border-bottom: #DADCE0 solid 1px">
                        <table class="table table-bordered table-hover text-center" id="userTable">

                        </table>
                    </div>
                    <div class="text-center">
                        <a class="btn btn-primary" style="background-color: #2F54EB;margin-top: 20px" @click="plcz">批量操作</a>
                    </div>
                </div>
            </div>
            <div class="col-xs-6" style="border: #F4F6FA 10px solid;border-bottom: #ffffff">
                <div class="col-xs-12">
                    <label style="margin-top: 27px;">历史借阅</label>
                </div>
                <div class="col-xs-12" style="height: 670px;overflow: auto">
                    <table class="table table-bordered table-hover text-center" id="jyTable">

                    </table>
                </div>
            </div>
        </div>
        <div v-show="startShow">
            <div class="col-xs-3 left">
                <div>
                    <div class="dalx">档案类型</div>
                </div>
                <div class="box" style="height: 700px;overflow: auto">
                    <div id="dalxTree"></div>
                </div>
            </div>
            <div class="col-xs-9 right">
                <div class="row" style="padding-top: 2%;padding-left: 1%">
                    <div class="col-xs-2">
                        <input type="text" class="form-control" v-model="keyword"  placeholder="输入关键字进行模糊查询" style="width: 163%;height: 32px;background-color: #DADCE0">
                    </div>
                    <div class="col-xs-1 col-xs-offset-1">
                        <a class="btn cancelBtn" @click="cancelSearch">搜索</a>
                    </div>
                </div>
                <!--<table class="table table-bordered table-hover text-center" id="dalxTable">-->

                <!--</table>-->
            </div>
        </div>
    </div>

</div>

<script src="/static/plugins/jQuery/jquery-2.2.3.min.js"></script>
<!-- Bootstrap 3.3.6 -->
<script src="/static/bootstrap/js/bootstrap.min.js"></script>
<!-- Slimscroll -->
<script src="/static/plugins/slimScroll/jquery.slimscroll.min.js"></script>
<!-- FastClick -->
<script src="/static/plugins/fastclick/fastclick.js"></script>

<!-- AdminLTE App -->
<script src="/static/dist/js/app.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="/static/dist/js/demo.js"></script>
<!--tabs-->
<script src="/static/dist/js/app_iframe.js"></script>
<script src="/static/js/bootstrap-treeview.js"></script>
<script src="/static/js/bootstrapValidator.min.js"></script>
<script src="/static/js/bootstrap-table.min.js"></script>
<script src="/static/js/bootstrap-table-zh-CN.js"></script>
<script src="/static/js/vue.js"></script>
<script src="/static/js/vue-resource.min.js"></script>
<script src="/static/layer/layer.js"></script>
<script src="/static/js/bootstrap-table-jumpto.js"></script>
<script src="/static/js/myJs.js?v=shujubuwqd12138"></script>
<script src="/static/js/viewer.min.js"></script>
<script src="/static/dist/js/pages/wJs.js?v=shujubuwqd12138"></script>
<script src="/static/js/newJs.js?v=shujubuwqd12138"></script>

<!--<script src="/static/js/jquery-viewer.js"></script>-->

<script type="text/javascript">
    newCss("/static/webCss/wdjy.css");
    var dalxName;
    var dalxId;
    var wdlxIds = new Array();
    var viewer2;
    //键盘按下
    var kdLxNodes;
    var kdid;
    var kdId;
    var kdtreeNum;
    window.document.onkeydown = isSearch;
    window.document.onkeydown = isSearch2;
    function getkjAndws(data) {
        for(var i = 0; i < data.length; i++){
            if(data[i].text == '科技档案'){
                vue.$data.kj = data[i].id;
            }else if(data[i].text == '文书档案'){
                vue.$data.ws = data[i].id;
            }else{
                if(data[i].nodes != null){
                    for(var m = 0; m < data[i].nodes.length; m++){
                        getkjAndws(data[i].nodes);
                    }
                }
            }
        }
    }
    function isSearch2(event) {
        var keynum2;
        var keychar;
        var numcheck;

        if(window.event) // IE
        {
            keynum2 = event.keyCode
        } else if(event.which) // Netscape/Firefox/Opera
        {
            keynum2 = event.which
        }
        if(keynum2 === 13){
            vue.cz();
        }
    }
    function paramsMatter(value,row,index) {
        var span=document.createElement('span');
        span.setAttribute('title',value);
        span.innerHTML = value;
        return span.outerHTML;
    }
    function isSearch(event) {
        var keynum;
        var keychar;
        var numcheck;

        if(window.event) // IE
        {
            keynum = event.keyCode
        } else if(event.which) // Netscape/Firefox/Opera
        {
            keynum = event.which
        }
        if(keynum === 37){
            if(kdtreeNum == 2){
                viewer2.destroy();
            }else if(kdtreeNum == 3){
                viewer.destroy();
            }
            openpre(kdLxNodes,kdid,kdId,kdtreeNum);
        }else if(keynum === 39){
            if(kdtreeNum == 2){
                viewer2.destroy();
            }else if(kdtreeNum == 3){
                viewer.destroy();
            }
            opennext(kdLxNodes,kdid,kdId,kdtreeNum);
        }
    }
    var nextid;
    var preid;
    var Id;
    var ids = new Array();
    //记录节点id；
    var nodeId;
    var nodeId2;
    //记录节点的个数
    var index;
    var nodeCheckedSilent = false;

    //生成序号
    function serialNumber(value, row, index) {
        var option = $("#dalxTable").bootstrapTable('getOptions');
        var pageSize = option.pageSize; //获取每页显示的数量
        var pageNumber = option.pageNumber; //获取当前是第几页
        return pageSize * (pageNumber - 1) + index + 1; //返回序号，注意index是从0开始的，所以要加上1
    }

    function nodeChecked(event, node) {
        if (nodeCheckedSilent) {
            return;
        }
        nodeCheckedSilent = true;
        checkAllParent(node);
        checkAllSon(node);
        nodeCheckedSilent = false;
    }

    var nodeUncheckedSilent = false;

    function nodeUnchecked(event, node) {
        if (nodeUncheckedSilent)
            return;
        nodeUncheckedSilent = true;
        uncheckAllParent(node);
        uncheckAllSon(node);
        nodeUncheckedSilent = false;
    }

    //选中全部父节点
    function checkAllParent(node) {
        $('#tree').treeview('checkNode', node.nodeId, {
            silent: true
        });
        var parentNode = $('#tree').treeview('getParent', node.nodeId);
        if (!("nodeId" in parentNode)) {
            return;
        } else {
            checkAllParent(parentNode);
        }
    }
    //取消全部父节点
    function uncheckAllParent(node) {
        $('#tree').treeview('uncheckNode', node.nodeId, {
            silent: true
        });
        var siblings = $('#tree').treeview('getSiblings', node.nodeId);
        var parentNode = $('#tree').treeview('getParent', node.nodeId);
        if (!("nodeId" in parentNode)) {
            return;
        }
        var isAllUnchecked = true; //是否全部没选中
        for (var i in siblings) {
            if (siblings[i].state.checked) {
                isAllUnchecked = false;
                break;
            }
        }
        if (isAllUnchecked) {
            uncheckAllParent(parentNode);
        }

    }

    //级联选中所有子节点
    function checkAllSon(node) {
        $('#tree').treeview('checkNode', node.nodeId, {
            silent: true
        });
        if (node.nodes != null && node.nodes.length > 0) {
            for (var i in node.nodes) {
                checkAllSon(node.nodes[i]);
            }
        }
    }
    //级联取消所有子节点
    function uncheckAllSon(node) {
        $('#tree').treeview('uncheckNode', node.nodeId, {
            silent: true
        });
        if (node.nodes != null && node.nodes.length > 0) {
            for (var i in node.nodes) {
                uncheckAllSon(node.nodes[i]);
            }
        }
    }



    var nodeCheckedSilent2 = false;

    function nodeChecked2(event, node) {
        if (nodeCheckedSilent2) {
            return;
        }
        nodeCheckedSilent2 = true;
        checkAllParent2(node);
        checkAllSon2(node);
        nodeCheckedSilent2 = false;
    }

    var nodeUncheckedSilent2 = false;

    function nodeUnchecked2(event, node) {
        if (nodeUncheckedSilent2)
            return;
        nodeUncheckedSilent2 = true;
        uncheckAllParent2(node);
        uncheckAllSon2(node);
        nodeUncheckedSilent2 = false;
    }

    //选中全部父节点
    function checkAllParent2(node) {
        $('#tree5').treeview('checkNode', node.nodeId, {
            silent: true
        });
        var parentNode = $('#tree5').treeview('getParent', node.nodeId);
        if (!("nodeId" in parentNode)) {
            return;
        } else {
            checkAllParent2(parentNode);
        }
    }
    //取消全部父节点
    function uncheckAllParent2(node) {
        $('#tree5').treeview('uncheckNode', node.nodeId, {
            silent: true
        });
        var siblings = $('#tree5').treeview('getSiblings', node.nodeId);
        var parentNode = $('#tree5').treeview('getParent', node.nodeId);
        if (!("nodeId" in parentNode)) {
            return;
        }
        var isAllUnchecked2 = true; //是否全部没选中
        for (var i in siblings) {
            if (siblings[i].state.checked) {
                isAllUnchecked2 = false;
                break;
            }
        }
        if (isAllUnchecked2) {
            uncheckAllParent2(parentNode);
        }

    }

    //级联选中所有子节点
    function checkAllSon2(node) {
        $('#tree5').treeview('checkNode', node.nodeId, {
            silent: true
        });
        if (node.nodes != null && node.nodes.length > 0) {
            for (var i in node.nodes) {
                checkAllSon2(node.nodes[i]);
            }
        }
    }
    //级联取消所有子节点
    function uncheckAllSon2(node) {
        $('#tree5').treeview('uncheckNode', node.nodeId, {
            silent: true
        });
        if (node.nodes != null && node.nodes.length > 0) {
            for (var i in node.nodes) {
                uncheckAllSon2(node.nodes[i]);
            }
        }
    }
    //打开上一张图片
    /*
    nowId为选择的节点id,
    ids为图片数组
    Id为借阅id
    treeNum分辨哪个treeview
     */
    function openpre(lxNodes,id,Id,treeNum) {
        preid = id;
        var upanddownImgVo = {
            'id':id,
            'type':0,
            'lxNodes':lxNodes,
        };
        $.ajax({
            url: '/jy/api/upanddownImg',
            type: 'post',
            dataType:'JSON',
            data: JSON.stringify(upanddownImgVo),
            cache: false,
            contentType: 'application/json; charset=UTF-8',
            processData: false,
            //dataType: "json",
            async: false,
            success: function (result) {
                if(result.code == 200){
                    var id = result.data;
                    preid = id;
                    kdid = id;
                    if(treeNum == 3){
                        $('#tree3Img').attr('dataUrl', '/jy/api/getImg?path='+id+'&jyId='+Id);
                        var viewer = new Viewer(document.getElementById('tree3'), {
                            inline: true,
                            url: 'dataUrl',
                            //navbar: false,
                            zIndexInline: 9999,
                            button: true,
                            backdrop: true,
                            keyboard:true,
                            navbar:false,
                            toolbar: {
                                zoomIn: {
                                    show: 1,
                                    click: function () {
                                        viewer.destroy();
                                    }
                                },
                                zoomOut: 0,
                                oneToOne: 0,
                                reset: 0,
                                prev: {
                                    show:1,
                                    click:function(){
                                        viewer.destroy();
                                        openpre(lxNodes,id,Id,3);
                                    }

                                },
                                next: {
                                    show:1,
                                    click:function(){
                                        viewer.destroy();
                                        opennext(lxNodes,id,Id,3)
                                    }
                                },
                                rotateLeft: 1,
                                rotateRight: 1,
                                flipHorizontal: 0,
                                flipVertical: 0,
                            },
                        });
                    }else if(treeNum == 2){
                        $('#tree2Img').attr('dataUrl', '/jy/api/getImg?path='+id+'&jyId='+Id);
                        viewer2 = new Viewer(document.getElementById('tree2'), {
                            inline: true,
                            url: 'dataUrl',
                            //navbar: false,
                            zIndexInline: 9999,
                            button: true,
                            backdrop: true,
                            keyboard:true,
                            navbar:false,
                            toolbar: {
                                zoomIn: {
                                    show: 1,
                                    click: function () {
                                        viewer2.destroy();
                                    }
                                },
                                zoomOut: 0,
                                oneToOne: 0,
                                reset: 0,
                                prev: {
                                    click:function(){
                                        viewer2.destroy();
                                        openpre(lxNodes,id,Id,2);
                                    }
                                },
                                next: {
                                    show:1,
                                    click:function(){
                                        viewer2.destroy();
                                        opennext(lxNodes,id,Id,2)
                                    }
                                },
                                rotateLeft: 1,
                                rotateRight: 1,
                                flipHorizontal: 0,
                                flipVertical: 0,
                            },
                        });
                    }
                }else {
                    cxAlertts("已经是第一张");
                    if(treeNum == 3){
                        $('#tree3Img').attr('dataUrl', '/jy/api/getImg?path='+preid+'&jyId='+Id);
                        var viewer = new Viewer(document.getElementById('tree3'), {
                            inline: true,
                            url: 'dataUrl',
                            //navbar: false,
                            zIndexInline: 9999,
                            button: true,
                            backdrop: true,
                            keyboard:true,
                            navbar:false,
                            toolbar: {
                                zoomIn: {
                                    show: 1,
                                    click: function () {
                                        viewer.destroy();
                                    }
                                },
                                zoomOut: 0,
                                oneToOne: 0,
                                reset: 0,
                                prev: {
                                    show:1,
                                    click:function(){
                                        viewer.destroy();
                                        openpre(lxNodes,preid,Id,3);
                                    }

                                },
                                next: {
                                    show:1,
                                    click:function(){
                                        viewer.destroy();
                                        opennext(lxNodes,preid,Id,3)
                                    }
                                },
                                rotateLeft: 1,
                                rotateRight: 1,
                                flipHorizontal: 0,
                                flipVertical: 0,
                            },
                        });
                    }else if(treeNum == 2){
                        $('#tree2Img').attr('dataUrl', '/jy/api/getImg?path='+preid+'&jyId='+Id);
                        viewer2 = new Viewer(document.getElementById('tree2'), {
                            inline: true,
                            url: 'dataUrl',
                            //navbar: false,
                            zIndexInline: 9999,
                            button: true,
                            backdrop: true,
                            keyboard:true,
                            navbar:false,
                            toolbar: {
                                zoomIn: {
                                    show: 1,
                                    click: function () {
                                        viewer2.destroy();
                                    }
                                },
                                zoomOut: 0,
                                oneToOne: 0,
                                reset: 0,
                                prev: {
                                    click:function(){
                                        viewer2.destroy();
                                        openpre(lxNodes,preid,Id,2);
                                    }
                                },
                                next: {
                                    show:1,
                                    click:function(){
                                        viewer2.destroy();
                                        opennext(lxNodes,preid,Id,2)
                                    }
                                },
                                rotateLeft: 1,
                                rotateRight: 1,
                                flipHorizontal: 0,
                                flipVertical: 0,
                            },
                        });
                    }
                }


            }
        });
    }
    //打开下一张
    function opennext(lxNodes,id,Id,treeNum) {
        nextid = id;
        var upanddownImgVo = {
            'id':id,
            'type':1,
            'lxNodes':lxNodes,
        };
        $.ajax({
            url: '/jy/api/upanddownImg',
            type: 'post',
            dataType:'JSON',
            data: JSON.stringify(upanddownImgVo),
            cache: false,
            contentType: 'application/json; charset=UTF-8',
            processData: false,
            //dataType: "json",
            async: false,
            success: function (result) {
                if(result.code == 200){
                    var id = result.data;
                    nextid = id;
                    kdid = id;
                    if(treeNum == 3){
                        $('#tree3Img').attr('dataUrl', '/jy/api/getImg?path='+id+'&jyId='+Id);
                        var viewer = new Viewer(document.getElementById('tree3'), {
                            inline: true,
                            url: 'dataUrl',
                            //navbar: false,
                            zIndexInline: 9999,
                            button: true,
                            backdrop: true,
                            keyboard:true,
                            navbar:false,
                            toolbar: {
                                zoomIn: {
                                    show: 1,
                                    click: function () {
                                        viewer.destroy();
                                    }
                                },
                                zoomOut: 0,
                                oneToOne: 0,
                                reset: 0,
                                prev: {
                                    show:1,
                                    click:function(){
                                        viewer.destroy();
                                        openpre(lxNodes,id,Id,3);
                                    }

                                },
                                next: {
                                    show:1,
                                    click:function(){
                                        viewer.destroy();
                                        opennext(lxNodes,id,Id,3)
                                    }
                                },
                                rotateLeft: 1,
                                rotateRight: 1,
                                flipHorizontal: 0,
                                flipVertical: 0,
                            },
                        });
                    }else if(treeNum == 2){
                        $('#tree2Img').attr('dataUrl', '/jy/api/getImg?path='+id+'&jyId='+Id);
                        viewer2 = new Viewer(document.getElementById('tree2'), {
                            inline: true,
                            url: 'dataUrl',
                            //navbar: false,
                            zIndexInline: 9999,
                            button: true,
                            backdrop: true,
                            keyboard:true,
                            navbar:false,
                            toolbar: {
                                zoomIn: {
                                    show: 1,
                                    click: function () {
                                        viewer2.destroy();
                                    }
                                },
                                zoomOut: 0,
                                oneToOne: 0,
                                reset: 0,
                                prev: {
                                    click:function(){
                                        viewer2.destroy();
                                        openpre(lxNodes,id,Id,2);
                                    }
                                },
                                next: {
                                    show:1,
                                    click:function(){
                                        viewer2.destroy();
                                        opennext(lxNodes,id,Id,2)
                                    }
                                },
                                rotateLeft: 1,
                                rotateRight: 1,
                                flipHorizontal: 0,
                                flipVertical: 0,
                            },
                        });
                    }
                }else {
                    cxAlertts("已经是最后一张");
                    if(treeNum == 3){
                        $('#tree3Img').attr('dataUrl', '/jy/api/getImg?path='+nextid+'&jyId='+Id);
                        var viewer = new Viewer(document.getElementById('tree3'), {
                            inline: true,
                            url: 'dataUrl',
                            //navbar: false,
                            zIndexInline: 9999,
                            button: true,
                            backdrop: true,
                            keyboard:true,
                            navbar:false,
                            toolbar: {
                                zoomIn: {
                                    show: 1,
                                    click: function () {
                                        viewer.destroy();
                                    }
                                },
                                zoomOut: 0,
                                oneToOne: 0,
                                reset: 0,
                                prev: {
                                    show:1,
                                    click:function(){
                                        viewer.destroy();
                                        openpre(lxNodes,nextid,Id,3);
                                    }
                                },
                                next: {
                                    show:1,
                                    click:function(){
                                        viewer.destroy();
                                        opennext(lxNodes,nextid,Id,3)
                                    }
                                },
                                rotateLeft: 1,
                                rotateRight: 1,
                                flipHorizontal: 0,
                                flipVertical: 0,
                            },
                        });
                    }else if(treeNum == 2){
                        $('#tree2Img').attr('dataUrl', '/jy/api/getImg?path='+nextid+'&jyId='+Id);
                        viewer2 = new Viewer(document.getElementById('tree2'), {
                            inline: true,
                            url: 'dataUrl',
                            //navbar: false,
                            zIndexInline: 9999,
                            button: true,
                            backdrop: true,
                            keyboard:true,
                            navbar:false,
                            toolbar: {
                                zoomIn: {
                                    show: 1,
                                    click: function () {
                                        viewer2.destroy();
                                    }
                                },
                                zoomOut: 0,
                                oneToOne: 0,
                                reset: 0,
                                prev: {
                                    click:function(){
                                        viewer2.destroy();
                                        openpre(lxNodes,nextid,Id,2);
                                    }
                                },
                                next: {
                                    show:1,
                                    click:function(){
                                        viewer2.destroy();
                                        opennext(lxNodes,nextid,Id,2)
                                    }
                                },
                                rotateLeft: 1,
                                rotateRight: 1,
                                flipHorizontal: 0,
                                flipVertical: 0,
                            },
                        });
                    }
                }
            }
        });
    }

    function printWj(){
        var nodes;
        nodes = $('#tree').treeview('getChecked');
        if("context" in nodes){
            nodes = $('#tree5').treeview('getChecked');
        }
        for(var i = 0;i < nodes.length;i++){
            var id = nodes[i].id;
            if(id.indexOf(".png")!=-1|| id.indexOf(".jpg")!=-1){
                var url = '/jy/api/getImg?path='+id+'&jyId='+Id;
                var newwindow = window.open(url);
                if(newwindow){
                    newwindow.print();
                }
            }else if(id.indexOf(".pdf")!=-1){
                id = decodeURIComponent(id);
                var u ="/jy/api/getPdf/"+id+"/"+Id;
                var pdfwindow = window.open(u);
                pdfwindow.print();
            }

        }

    }
    function downloadWj(){
        var ids = new Array();
        var nodes;
        nodes = $('#tree').treeview('getChecked');
        if("context" in nodes){
            nodes = $('#tree5').treeview('getChecked');
        }
        for(var i = 0;i < nodes.length;i++){
            var id = nodes[i].id;
            ids[i] = id;
        }
        var data = {"ids":ids,"jyId":Id}
        var url = "/jy/api/download?ids="+ids+"&jyId="+Id;
        window.open(url);
        cxAlertOk("下载成功")
    }

    function shJm(dalx,id,dabh) {
        var myMsg = cxLoad("查看档案中");
        vue.$http.get('/dagl/api/queryKjWsFlag?dabh='+dabh).then(function (res) {
            var data = res.body;
            if(data.code == 200){
                layer.close(myMsg);
                if(data.data === 1){
                    //通用
                    top.addTabs({
                        id: "19001111",
                        text: "档案查看",
                        icon: "fa fa-tasks",
                        url: "ckkjda?id="+id+"&dabh="+dabh+"&wdlxName="+vue.$data.wdlxName+"&keyword="+vue.$data.keyword+"&dalxShow="+vue.$data.dalxShow+"&wdlxId="+wdlxIds[0],
                        targetType: "iframe-tab",
                        close:true,
                    });
                }else if(data.data === 3){
                    //文书
                    top.addTabs({
                        id: "19001112",
                        text: "档案查看",
                        icon: "fa fa-tasks",
                        url: "ckwsda?id="+id+"&dabh="+dabh+"&wdlxName="+vue.$data.wdlxName+"&keyword="+vue.$data.keyword+"&dalxShow="+vue.$data.dalxShow+"&wdlxId="+wdlxIds[0],
                        targetType: "iframe-tab",
                        close:true,
                    });
                }else {
                    //个人
                    top.addTabs({
                        id: "190011111",
                        text: "档案查看",
                        icon: "fa fa-tasks",
                        url: "ckgryf?id="+id+"&dabh="+dabh+"&wdlxName="+vue.$data.wdlxName+"&keyword="+vue.$data.keyword+"&dalxShow="+vue.$data.dalxShow+"&wdlxId="+wdlxIds[0],
                        targetType: "iframe-tab",
                        close:true,
                    });
                }
            }
        })
    }

    //借阅登记
    function jydj(dabh,xmmc,typeName,typeId,id) {
        $('#userTable').bootstrapTable('hideColumn', 'cz');
        vue.$data.jyxx2.dabh = dabh;
        vue.$data.jyxx2.damc = xmmc;
        vue.$data.jyxx2.dalx = typeName;
        vue.$data.jyxx2.jyyy = "登记";
        vue.$data.jyxx2.jysx = 10;
        //vue.$data.jyxx2.shrId = 3;
        vue.$data.jyxx2.id = id;
        var myMsg = cxLoad("借阅登记中");
        vue.$data.isExitcl = false;
        $.get("/dalr/api/findDaByDabh",{"dabh":dabh,"tyepId":typeId}, function(result){
            if(result.code == 200){
                if(result.data.cl.length === 0){
                    vue.$data.isExitcl = true;
                }
                layer.close(myMsg);
                $('#userTable').bootstrapTable('showColumn', 'cz');
                $('#dadjtree').treeview('');
                $('#dadjtree').treeview({
                    color: "#428bca",
                    highlightSelected:false,     //是否选中高亮显示
                    onhoverColor: "#f5f5f5",    //鼠标滑过的颜色
                    levels: 0 ,                 //设置初始化展开几级菜单 默认为2
                    showBorder:true,                //是否显示边框
                    showCheckbox:false,              //是否显示多选框
                    data:result.data.cl,
                    showTags:true,
                    showCheckbox: true,
                    silent:true,
                    //text:arr[0].xmmc,
                    onNodeChecked: nodeChecked,
                    onNodeUnchecked: nodeUnchecked,
                    //checked:true,
                    multiSelect: true,
                    //showTags:true,
                });
                for(var i = 0;i < result.data.cl.length;i++){
                    $('#dadjtree').treeview('checkNode', i);
                }
                $('#jydjDiv').modal('show');
            }else {
                layer.close(myMsg);
                $('#userTable').bootstrapTable('showColumn', 'cz');
            }
        });
    }

    //借阅申请
    function jysq(dabh,xmmc,typeName,typeId) {
        vue.$data.jyxx2.dabh = dabh;
        vue.$data.jyxx2.damc = xmmc;
        top.addTabs({
            id: "19001117",
            text: "借阅申请",
            icon: "fa fa-tasks",
            url: "jysq?dabh="+dabh+"&xmmc="+xmmc+"&typeName="+typeName+"&typeId="+typeId+"&wdlxName="+vue.$data.wdlxName+"&keyword="+vue.$data.keyword+"&dalxShow="+vue.$data.dalxShow+"&wdlxId="+wdlxIds[0]+"&dalxId="+vue.$data.zt+"&root="+vue.$data.root+"&dalxName="+dalxName,
            targetType: "iframe-tab",
            close:true,
        });
    }

    //个人用房借阅登记
    function gryfjydj(dabh,zhh) {
        vue.$data.isExitcl = false;
        $('#userTable').bootstrapTable('hideColumn', 'cz');
        vue.$data.jyxx2.damc = zhh;
        vue.$data.jyxx2.dabh = dabh;
        vue.$data.jyxx2.jyyy = "登记";
        vue.$data.jyxx2.jysx = 10;
        var myMsg = cxLoad("借阅登记中");
        $.get("/dalr/api/findDaByDabh",{"dabh":dabh,"tyepId":vue.$data.zt}, function(result){
            if(result.code == 200){
                layer.close(myMsg);
                if(result.data.cl.length === 0){
                    vue.$data.isExitcl = true;
                }
                $('#userTable').bootstrapTable('showColumn', 'cz');
                $('#dadjtree').treeview('');
                $('#dadjtree').treeview({
                    color: "#428bca",
                    highlightSelected:false,     //是否选中高亮显示
                    onhoverColor: "#f5f5f5",    //鼠标滑过的颜色
                    levels: 0 ,                 //设置初始化展开几级菜单 默认为2
                    showBorder:true,                //是否显示边框
                    showCheckbox:false,              //是否显示多选框
                    data:result.data.cl,
                    showTags:true,
                    showCheckbox: true,
                    silent:true,
                    //text:arr[0].xmmc,
                    onNodeChecked: nodeChecked,
                    onNodeUnchecked: nodeUnchecked,
                    //checked:true,
                    multiSelect: true,
                    //showTags:true,
                });
                for(var i = 0;i < result.data.cl.length;i++){
                    $('#dadjtree').treeview('checkNode', i);
                }
                vue.suredj();
                //$('#jydjDiv').modal('show');
            }else {
                layer.close(myMsg);
                $('#userTable').bootstrapTable('showColumn', 'cz');
            }
        });
    }

    //个人用房借阅申请
    function gryfjysq(dabh,zhh) {
        vue.$data.jyxx2.dabh = dabh;
        top.addTabs({
            id: "19001117",
            text: "借阅申请",
            icon: "fa fa-tasks",
            url: "jysq?dabh="+dabh+"&typeId="+vue.$data.zt+"&wdlxName="+vue.$data.wdlxName+"&keyword="+vue.$data.keyword+"&dalxShow="+vue.$data.dalxShow+"&wdlxId="+wdlxIds[0]+"&dalxId="+vue.$data.zt+"&root="+vue.$data.root+"&dalxName="+dalxName+"&xmmc="+zhh,
            targetType: "iframe-tab",
            close:true,
        });
    }

    //查看
    function ck(dalxId,root,dalx) {
        vue.$data.isCk = true;
        vue.$data.dalxShow = false;
        vue.$data.zt = dalxId;
        vue.$data.root = root;
        dalxName = dalx;
        if(dalx === "个人用房"){
            vue.$data.isGryf = true;
        }else{
            vue.$data.isGryf = false;
        }
        vue.dalxChange();
    }

    var vue = new Vue({
        el: '#yhgl',
        data: {
            isExitcl:false,//材料信息没有显示提示
            isCk:false,//点击查看按钮之后，档案类型不能选择
            dalxShow:true,
            wdlxName:null,//选择档案类型
            root:null,
            isGryf:false,
            startShow:false,
            mainShow:true,
            allLx:null,
            kj:null,
            ws:null,
            ids:[],
            pljy:{
                dabhs:[],
                jyyy:null,
                shrId:null,
                jysc:5,
                dalxId:null,
            },
            allShy:null,
            role:null,
            zt:7,//状态
            keyword:null,
            jyxx2:{
                clxxIds:[],
                jyyy:null,
                jysx:5,
                dabh:null,
                jyrLxdh:null,
                jyr:null,
                shrLxdh:null,
                shrId:null,
                shr:null,
                damc:null,
                dalx:null,
            },
            jyxx: {
                jyyy: null,
                jysx: null,
                dabh: null,
                jyrLxdh: null,
                jyr: null,
                shrLxdh: null,
                shrId: null,
                shr: null,
                damc: null,
                dalx: null,
            },
            gdxx: {
                typeName:null,
                type_name:null,//
                id:null,
                typeId:null,//
                dabh:null,
                xmbh:null,
                xmmc:null,
                year:null,
                dtslbh:null,//大厅受理编号
                yhh:null,//原盒号
                jsdw:null,//建设单位
                jswz:null,//建设位置
                jsxmxzyjssj:null,//建设项目选址意见书时间
                xzxmmc:null,//选址项目名称
                xzydmj:null,//选址用地面积
                jsydghxkzsj:null,//建设用地规划许可证时间
                ghxmmc:null,//规划项目名称
                ghydmj:null,//规划用地面积
                jsgcghxkzsj:null,//建设工程规划许可证时间
                gcxmmc:null,//工程项目名称
                gcjsgm:null,//工程建设规模
                jsgcjgghyshgsj:null,//建设工程竣工规划验收合格证时间
                gcjgxmmc:null,//工程竣工项目名称
                gcjgjsgm:null,//工程竣工建设规模
                jsgcsgxkzsj:null,//建设工程施工许可证时间
                jsgcsgxkzbh:null,//建设工程施工许可证编号
                sggcmc:null,//施工工程名称
                sgjsgm:null,//施工建设规模
                qt:null,//其他
                xmfatgsj:null,//项目通过时间
                ys:null,//页数
                daccwz:null,//档案存储位置
                clj:null,//超链接
                zly:null,//著录员
                zlsj:null,//著录时间
                bz:null,//备注
            },
            wsxx:{
                bz:null,
                jyId:null,
                //files:[],
                id:null,
                typeId:null,
                dabh:null,//档案编号
                dwmc:null,//单位名称
                nf:null,//年份
                sj:null,//时间
                typeName:null,
                wh:null,//文号
                wjmc:null,//文件名称
                yh:null,//页号
                ys:null,//页数
                zhh:null,//总盒号
            }
        },
        methods: {
            kjSelect:function(){
                if(this.isCk){
                    cxAlert('请先返回上一级再选择！');
                    return;
                }else {
                    $('#lxxzModal').modal('show');
                    var myMsg = cxLoad("选择中");
                    this.$http.get('/dagl/api/queryDalx').then( function (result) {
                        var node = new Array();
                        var data = result.body;
                        if(data.code == 200){
                            layer.close(myMsg);
                            //getid(data.data);
                            data = data.data[0].nodes;
                            //console.log(data);
                            $('#lxTree').treeview({
                                color: "#428bca",
                                collapseIcon: "glyphicon glyphicon-minus",//可收缩的节点图标
                                // nodeIcon: "glyphicon glyphicon-user",
                                emptyIcon: "glyphicon glyphicon-file",//设置列表树中没有子节点的节点的图标
                                expandIcon: "glyphicon glyphicon-plus",  //设置列表上中有子节点的图标
                                highlightSearchResults:true,//是否高亮搜索结果 默认true
                                highlightSelected:true,     //是否选中高亮显示
                                onhoverColor: "#f5f5f5",    //鼠标滑过的颜色
                                levels: 0 ,                 //设置初始化展开几级菜单 默认为2
                                //selectedIcon: 'glyphicon glyphicon-tint',
                                showBorder:true,                //是否显示边框
                                showCheckbox:false,              //是否显示多选框
                                data:data,
                                showTags:true,
                                onNodeSelected:function(event, data) {
                                    wdlxIds = [];
                                    vue.$data.wdlxName = data.text;
                                    wdlxIds.push(data.id);
                                    $('#lxxzModal').modal('hide');
                                    vue.cancelSearch();
                                }
                            });
                        }else{
                            layer.close(myMsg);
                            cxAlert(data.mess);
                        }
                    })
                }
            },
            //返回
            goback:function(){
                this.dalxShow = true;
                this.isCk = false;
                this.searchDalx();
            },
            cancelSearch:function(){
                if(this.wdlxName == null){
                    cxAlert('请先选择档案类型');
                    return;
                }
                if(this.dalxShow){
                    this.searchDalx();
                }else {
                    this.cz();
                }
            },
            //大类型表格查询
            searchDalx:function () {
                if(this.keyword == null){
                    $("#dalxTable").bootstrapTable('destroy');
                    $('#dalxTable').bootstrapTable({
                        url: '/dajsOuterCx?wdlx='+wdlxIds,
                        contentType: "application/json; charset=UTF-8",
                        type: "GET",
                        dataType: 'json',
                        queryParamsType: "",
                        singleSelect: true,
                        striped: true,
                        smartDisplay: false,
                        cache: false,
                        //pagination:true,  //设置为 true 会在表格底部显示分页条。
                        paginationLoop:false, //设置为 true 启用分页条无限循环的功能。
                        pageSize:20,//每页初始显示的条数
                        pageList:[5,10],
                        toolbar: "#addtool",
                        sidePagination: 'server',
                        queryParams: function (params) {
                            return {
                                'pageNum':params.pageNumber,
                                'pageSize':params.pageSize,
                            };
                        },
                        columns: [{
                            field: 'id',
                            title: '序号',
                            formatter:serialNumber
                        },{
                            field: 'root',
                            title: '主要类型',
                            formatter:paramsMatter
                        }, {
                            field: 'dalx',
                            title: '详细类型',
                            formatter:paramsMatter
                        },{
                            field: 'number',
                            title: '查询结果',
                            formatter:paramsMatter
                        }
                            ,{
                                field: 'cz',
                                title: '操作',
                                formatter: function (value, row, index) {
                                    //let sj = {"dabh":row.dabh,"typeId":row.typeId};
                                    return '<a style="color: #2C72E8;font-size: 16px" href="javascript:ck('+row.dalxId+',\''+row.root+'\',\''+row.dalx+'\')">查看</a>'
                                }
                            }
                        ],
                        responseHandler: function (res) {  //后台返回的结果
                            if (res.code == "200") {
                                var data = res.data;
                                var NewData = [];
                                for(var i=0;i<data.length;i++){
                                    NewData.push(data[i]);
                                }
                                var data = {
                                    rows: NewData,
                                    total:data.total
                                };
                                return data;
                            }
                        }
                    });
                }else {
                    $("#dalxTable").bootstrapTable('destroy');
                    $('#dalxTable').bootstrapTable({
                        url: '/dajsOuterCx?wdlx='+wdlxIds+'&keyword='+this.keyword,
                        contentType: "application/json; charset=UTF-8",
                        type: "GET",
                        dataType: 'json',
                        queryParamsType: "",
                        singleSelect: true,
                        striped: true,
                        smartDisplay: false,
                        cache: false,
                        //pagination:true,  //设置为 true 会在表格底部显示分页条。
                        paginationLoop:false, //设置为 true 启用分页条无限循环的功能。
                        pageSize:20,//每页初始显示的条数
                        pageList:[5,10],
                        toolbar: "#addtool",
                        sidePagination: 'server',
                        queryParams: function (params) {
                            return {
                                'pageNum':params.pageNumber,
                                'pageSize':params.pageSize,
                            };
                        },
                        columns: [{
                            field: 'id',
                            title: '序号',
                            formatter:serialNumber
                        },{
                            field: 'root',
                            title: '主要类型',
                            formatter:paramsMatter
                        }, {
                            field: 'dalx',
                            title: '详细类型',
                            formatter:paramsMatter
                        },{
                            field: 'number',
                            title: '查询结果',
                            formatter:paramsMatter
                        }
                            ,{
                                field: 'cz',
                                title: '操作',
                                formatter: function (value, row, index) {
                                    //let sj = {"dabh":row.dabh,"typeId":row.typeId};
                                    return '<a style="color: #2C72E8;font-size: 16px" href="javascript:ck('+row.dalxId+',\''+row.root+'\',\''+row.dalx+'\')">查看</a>'
                                }
                            }
                        ],
                        responseHandler: function (res) {  //后台返回的结果
                            if (res.code == "200") {
                                var data = res.data;
                                var NewData = [];
                                for(var i=0;i<data.length;i++){
                                    NewData.push(data[i]);
                                }
                                var data = {
                                    rows: NewData,
                                    total:data.total
                                };
                                return data;
                            }
                        }
                    });
                }
            },
            suredj:function(){
                var selectedNodes = $('#dadjtree').treeview('getChecked');
                var arr = new Array();
                var arr2 = new Array();
                if(selectedNodes.length != 0){
                    for(var i = 0;i <selectedNodes.length;i++){
                        arr.push(selectedNodes[i].id);
                    }
                    this.jyxx2.clxxIds = arr;
                }else {
                    this.jyxx2.clxxIds = [];
                }
                var myMsg = cxLoad("借阅中");
                vue.$http.post('/jy/api/daJy',vue.$data.jyxx2).then( function (result) {
                    $('#userTable').bootstrapTable('showColumn', 'cz');
                    var data = result.body;
                    if(data.code == 200){
                        layer.close(myMsg);
                        $('#userTable').bootstrapTable('showColumn', 'cz');
                        cxAlertOk("借阅登记成功");
                        $('#jydjDiv').modal('hide');
                        $("#jyTable").bootstrapTable('destroy');
                        $('#jyTable').bootstrapTable({
                            url: '/jy/api/queryJy?zt=1',
                            contentType: "application/json; charset=UTF-8",
                            type: "GET",
                            dataType: 'json',
                            queryParamsType: "",
                            sortName : 'id',
                            sortOrder : 'desc',
                            singleSelect: true,
                            striped: true,
                            smartDisplay: false,
                            cache: false,
                            pagination: true,  //设置为 true 会在表格底部显示分页条。
                            paginationLoop: false, //设置为 true 启用分页条无限循环的功能。
                            pageSize: 10,//每页初始显示的条数
                            pageList: [10],
                            toolbar: "#addtool",
                            sidePagination: 'server',
                            queryParams: function (params) {
                                return {'pageNum': params.pageNumber, 'pageSize': params.pageSize,'sort':params.sortOrder};
                            },
                            toolbar: "#addtool",
                            columns: [
                                {
                                    field: 'id',
                                    title: '序号',
                                    formatter:paramsMatter
                                },
                                {
                                    field: 'dabh',
                                    title: '档案编号',
                                    formatter:paramsMatter
                                },
                                {
                                    field: 'ajtm',
                                    title: '案卷题名',
                                    formatter:paramsMatter
                                },{
                                    field: 'jssj',
                                    title: '借阅结束时间',
                                    formatter:paramsMatter
                                },
                                {
                                    field: 'zt',
                                    title: '状态',
                                    formatter: function (value, row, index) {
                                        var str = "";
                                        if (value == 0) {
                                            str = "<span class='text-muted'><b>待审核</b></span>";
                                        } else if (value == 1) {
                                            str = "<span class='text-success'><b>审核通过</b></span>";
                                        } else if (value == 2) {
                                            str = "<span class='text-danger'><b>拒绝</b></span>";
                                        }else if (value == 3) {
                                            str = "<span class='text-primary'><b>已过期</b></span>";
                                        }
                                        return str;
                                    }
                                },
                                {
                                    field: 'cz',
                                    title: '操作',
                                    formatter: function (value, row, index) {
                                        if (row.zt == 1) {
                                            var str = "<a href='javascript:shJm(\"" + row.dalx +"\","+row.id+",\""+row.dabh+ "\")' style='color: #2770E8'>查看档案</a>";
                                            return str;
                                        } else {
                                            var str = "<a style='color: #2770E8'>查看档案</a>";
                                            return str;
                                        }

                                    }
                                }],
                            responseHandler: function (res) {  //后台返回的结果
                                if (res.code == "200") {
                                    var data = res.data;
                                    var NewData = [];
                                    for (i = 0; i < data.data.length; i++) {
                                        NewData.push(data.data[i]);
                                    }
                                    var data = {
                                        rows: NewData,
                                        total: data.total
                                    };
                                    return data;
                                }
                            }
                        });
                        vue.dalxChange();
                        vue.$data.jyxx2.jyyy = null;
                        vue.$data.jyxx2.jysx = null;
                        //vue.$data.jyxx2.shrId = null;
                    }else{
                        layer.close(myMsg);
                        $('#userTable').bootstrapTable('showColumn', 'cz');
                        cxAlert(data.mess);
                        vue.$data.jyxx2.jyyy = null;
                        //vue.$data.jyxx2.jysx = null;
                        //vue.$data.jyxx2.shrId = null;
                    }
                })
            },
            canceldj:function(){
                $('#jydjDiv').modal('hide');
                $('#userTable').bootstrapTable('showColumn', 'cz');
            },
            dalxChange:function(){
                this.pljy.dalxId = this.zt;
                this.startShow = false;
                this.mainShow = true;
                var url;
                if(this.keyword == null){
                    url = '/dajsCx';
                }else {
                    url = '/dajsCx?keyword='+this.keyword;
                }
                if(this.isGryf){
                    $("#userTable").bootstrapTable('destroy');
                    $('#userTable').bootstrapTable({
                        url: url,
                        contentType: "application/json; charset=UTF-8",
                        type: "GET",
                        dataType: 'json',
                        queryParamsType: "",
                        sortName : 'id',
                        sortOrder : 'desc',
                        singleSelect: false,
                        striped: true,
                        smartDisplay: false,
                        cache: false,
                        pagination:true,  //设置为 true 会在表格底部显示分页条。
                        paginationLoop:false, //设置为 true 启用分页条无限循环的功能。
                        pageSize:20,//每页初始显示的条数
                        pageList:[5,10],
                        toolbar: "#addtool",
                        sidePagination: 'server',
                        showJumpto: true,
                        queryParams: function (params) {
                            vue.$data.sort = params.sortOrder;
                            return {
                                'pageNum':params.pageNumber,
                                'pageSize':params.pageSize,
                                'wdlx':vue.$data.zt,
                                'sort':params.sortOrder,
                            };
                        },
                        columns: [{
                            checkbox:true,
                        },{
                            field: 'id',
                            title: '顺序号',
                            sortable : true,
                            formatter:paramsMatter
                        },{
                            field: 'dabh',
                            title: '档案编号',
                            formatter:paramsMatter
                        }, {
                            field: 'townBsc',
                            title: '镇/办事处',
                            formatter:paramsMatter
                        },{
                            field: 'villageJwh',
                            title: '村/居委会',
                            formatter:paramsMatter
                        }, {
                            field: 'zhh',
                            title: '案卷题名',
                            formatter:paramsMatter
                        }, {
                            field: 'sqcl',
                            title: '申请材料',
                            formatter:paramsMatter
                        },{
                            field: 'cz',
                            title: '操作',
                            formatter: function (value, row, index) {
                                if (vue.$data.role == 1 || vue.$data.role == 2) {
                                    var str = "<a href='javascript:gryfjydj(\""+row.dabh+"\",\""+row.zhh+"\")' style='color: #2770E8'>借阅登记</a>";
                                    return str;
                                } else {
                                    var str = "<a href='javascript:gryfjysq(\""+row.dabh+"\",\""+row.zhh+"\")' style='color: #2770E8'>借阅申请</a>";
                                    return str;
                                }

                            }
                        }],
                        responseHandler: function (res) {  //后台返回的结果
                            if (res.code == "200") {
                                var data = res.data;
                                var NewData = [];
                                for(var i=0;i<data.data.length;i++){
                                    NewData.push(data.data[i]);
                                }
                                var data = {
                                    rows: NewData,
                                    total:data.total
                                };
                                return data;
                            }
                        }
                    });
                }else {
                    if(this.root === "科技"){
                        $("#userTable").bootstrapTable('destroy');
                        $('#userTable').bootstrapTable({
                            url: url,
                            contentType: "application/json; charset=UTF-8",
                            type: "GET",
                            dataType: 'json',
                            queryParamsType: "",
                            sortName : 'id',
                            sortOrder : 'desc',
                            singleSelect: false,
                            striped: true,
                            smartDisplay: false,
                            cache: false,
                            pagination: true,  //设置为 true 会在表格底部显示分页条。
                            paginationLoop: false, //设置为 true 启用分页条无限循环的功能。
                            pageSize: 10,//每页初始显示的条数
                            pageList: [10],
                            toolbar: "#addtool",
                            sidePagination: 'server',
                            showJumpto: true,
                            queryParams: function (params) {
                                vue.$data.sort = params.sortOrder;
                                vue.$data.jyxx2.dalx = vue.$data.zt;
                                return {
                                    'pageNum':params.pageNumber,
                                    'pageSize':params.pageSize,
                                    'wdlx':vue.$data.zt,
                                    'sort':params.sortOrder
                                };
                            },
                            toolbar: "#addtool",
                            columns: [
                                {
                                    checkbox:true,
                                },{
                                    field: 'id',
                                    title: '序号',
                                    sortable : true,
                                    formatter:paramsMatter
                                },
                                {
                                    field: 'dabh',
                                    title: '档案编号',
                                    formatter:paramsMatter
                                },
                                {
                                    field: 'ajtm',
                                    title: '案卷题名',
                                    formatter:paramsMatter
                                },
                                {
                                    field: 'dtslbh',
                                    title: '大厅受理编号',
                                    formatter:paramsMatter
                                },
                                {
                                    field: 'cz',
                                    title: '操作',
                                    formatter: function (value, row, index) {
                                        if (vue.$data.role == 1 || vue.$data.role == 2) {
                                            var str = "<a href='javascript:jydj(\""+row.dabh+"\",\""+row.ajtm+"\",\""+row.typeName+"\",\""+row.typeId+"\","+row.id+")' style='color: #2770E8'>借阅登记</a>";
                                            return str;
                                        } else {
                                            var str = "<a href='javascript:jysq(\""+row.dabh+"\",\""+row.ajtm+"\",\""+row.typeName+"\",\""+row.typeId+"\")' style='color: #2770E8'>借阅申请</a>";
                                            return str;
                                        }

                                    }
                                }],
                            responseHandler: function (res) {  //后台返回的结果
                                if (res.code == "200") {
                                    var data = res.data;
                                    var NewData = [];
                                    for (i = 0; i < data.data.length; i++) {
                                        NewData.push(data.data[i]);
                                    }
                                    var data = {
                                        rows: NewData,
                                        total: data.total
                                    };
                                    return data;
                                }
                            }
                        });
                    }else{
                        $("#userTable").bootstrapTable('destroy');
                        $('#userTable').bootstrapTable({
                            url: url,
                            contentType: "application/json; charset=UTF-8",
                            type: "GET",
                            dataType: 'json',
                            queryParamsType: "",
                            sortName : 'sqsj',
                            sortOrder : 'desc',
                            singleSelect: false,
                            striped: true,
                            smartDisplay: false,
                            cache: false,
                            pagination: true,  //设置为 true 会在表格底部显示分页条。
                            paginationLoop: false, //设置为 true 启用分页条无限循环的功能。
                            pageSize: 10,//每页初始显示的条数
                            pageList: [10],
                            toolbar: "#addtool",
                            sidePagination: 'server',
                            showJumpto: true,
                            queryParams: function (params) {
                                vue.$data.sort = params.sortOrder;
                                vue.$data.jyxx2.dalx = vue.$data.zt;
                                return {
                                    'pageNum':params.pageNumber,
                                    'pageSize':params.pageSize,
                                    'wdlx':vue.$data.zt,
                                    'sort':params.sortOrder,
                                };
                            },
                            toolbar: "#addtool",
                            columns: [
                                {
                                    checkbox:true,
                                },{
                                    field: 'id',
                                    title: '序号',
                                    sortable : true,
                                    formatter:paramsMatter
                                },
                                {
                                    field: 'dabh',
                                    title: '档案编号',
                                    formatter:paramsMatter
                                },
                                {
                                    field: 'ajtm',
                                    title: '案卷题名',
                                    formatter:paramsMatter
                                },
                                {
                                    field: 'wh',
                                    title: '文号',
                                    formatter:paramsMatter
                                },
                                {
                                    field: 'cz',
                                    title: '操作',
                                    formatter: function (value, row, index) {
                                        if (vue.$data.role == 1 || vue.$data.role == 2) {
                                            var str = "<a href='javascript:jydj(\""+row.dabh+"\",\""+row.ajtm+"\",\""+row.typeName+"\",\""+row.typeId+"\","+row.id+")' style='color: #2770E8'>借阅登记</a>";
                                            return str;
                                        } else {
                                            var str = "<a href='javascript:jysq(\""+row.dabh+"\",\""+row.ajtm+"\",\""+row.typeName+"\",\""+row.typeId+"\")' style='color: #2770E8'>借阅申请</a>";
                                            return str;
                                        }

                                    }
                                }],
                            responseHandler: function (res) {  //后台返回的结果
                                if (res.code == "200") {
                                    var data = res.data;
                                    var NewData = [];
                                    for (i = 0; i < data.data.length; i++) {
                                        NewData.push(data.data[i]);
                                    }
                                    var data = {
                                        rows: NewData,
                                        total: data.total
                                    };
                                    return data;
                                }
                            }
                        });
                    }
                }
            },
            //全选
            selectAll:function(){
                //var node;
                for(var i = 0;i < index; i++){
                    $('#tree').treeview('checkNode', i);
                }

            },
            //反选
            selectNull:function(){
                //var node;
                for(var i = 0;i < index;i++){
                    $('#tree').treeview('uncheckNode',i);
                }


            },
            cancelpl:function(){
                // vue.$data.ids = [];
                // vue.$data.pljy.dabhs = [];
                $("#plForm").data('bootstrapValidator').resetForm();//清除当前验证的关键之处
                $('#pljydaDiv').modal('hide');
            },
            plcz:function(){
                if(vue.$data.ids.length == 0){
                    cxAlert("请先选择要借阅的档案");
                    return;
                }
                $('#pljydaDiv').modal('show');
            },
            doSqpl:function(){
                var bootstrapValidator1 = $("#plForm").data('bootstrapValidator');
                bootstrapValidator1.validate();
                if(bootstrapValidator1.isValid()){
                    vue.$data.pljy.dabhs = vue.$data.ids;
                    var data = {
                        //'dabhs':vue.$data.pljy.dabhs,
                        'jyyy':vue.$data.pljy.jyyy,
                        'dalxId':vue.$data.pljy.dalxId,
                        'jysc':vue.$data.pljy.jysc,
                        'shrId':vue.$data.pljy.shrId,
                    };
                    var myMsg = cxLoad("借阅中");
                    this.$http.post('/jy/api/batchdaJy?dabhs='+vue.$data.pljy.dabhs,data,{emulateJSON:true}).then(function (res) {
                        var data = res.body;
                        if(data.code == 200){
                            layer.close(myMsg);
                            cxAlertOk("成功提交申请，请等待审核员审批");
                            vue.$data.ids = [];
                            vue.$data.pljy.dabhs = [];
                            $("#plForm").data('bootstrapValidator').resetForm();//清除当前验证的关键之处
                            $('#pljydaDiv').modal('hide');
                            $("#jyTable").bootstrapTable('destroy');
                            $('#jyTable').bootstrapTable({
                                url: '/jy/api/queryJy?zt=1',
                                contentType: "application/json; charset=UTF-8",
                                type: "GET",
                                dataType: 'json',
                                queryParamsType: "",
                                sortName : 'id',
                                sortOrder : 'desc',
                                singleSelect: true,
                                striped: true,
                                smartDisplay: false,
                                cache: false,
                                pagination: true,  //设置为 true 会在表格底部显示分页条。
                                paginationLoop: false, //设置为 true 启用分页条无限循环的功能。
                                pageSize: 10,//每页初始显示的条数
                                pageList: [10],
                                toolbar: "#addtool",
                                sidePagination: 'server',
                                queryParams: function (params) {
                                    return {'pageNum': params.pageNumber, 'pageSize': params.pageSize,'sort':params.sortOrder};
                                },
                                toolbar: "#addtool",
                                columns: [
                                    {
                                        field: 'id',
                                        title: '序号',
                                        formatter:paramsMatter
                                    },{
                                        field: 'dabh',
                                        title: '档案编号',
                                        formatter:paramsMatter
                                    },
                                    {
                                        field: 'ajtm',
                                        title: '案卷题名',
                                        formatter:paramsMatter
                                    },{
                                        field: 'jssj',
                                        title: '借阅结束时间',
                                        formatter:paramsMatter
                                    },
                                    {
                                        field: 'zt',
                                        title: '状态',
                                        formatter: function (value, row, index) {
                                            var str = "";
                                            if (value == 0) {
                                                str = "<span class='text-muted'><b>待审核</b></span>";
                                            } else if (value == 1) {
                                                str = "<span class='text-success'><b>审核通过</b></span>";
                                            } else if (value == 2) {
                                                str = "<span class='text-danger'><b>拒绝</b></span>";
                                            }else if (value == 3) {
                                                str = "<span class='text-primary'><b>已过期</b></span>";
                                            }
                                            return str;
                                        }
                                    },
                                    {
                                        field: 'cz',
                                        title: '操作',
                                        formatter: function (value, row, index) {
                                            if (row.zt == 1) {
                                                var str = "<a href='javascript:shJm(\"" + row.dalx +"\","+row.id+",\""+row.dabh+ "\")' style='color: #2770E8'>查看档案</a>";
                                                return str;
                                            } else {
                                                var str = "<a style='color: #2770E8'>查看档案</a>";
                                                return str;
                                            }

                                        }
                                    }],
                                responseHandler: function (res) {  //后台返回的结果
                                    if (res.code == "200") {
                                        var data = res.data;
                                        var NewData = [];
                                        for (i = 0; i < data.data.length; i++) {
                                            NewData.push(data.data[i]);
                                        }
                                        var data = {
                                            rows: NewData,
                                            total: data.total
                                        };
                                        return data;
                                    }
                                }
                            });
                            if(isKj(vue.$data.zt)){
                                $("#userTable").bootstrapTable('destroy');
                                $('#userTable').bootstrapTable({
                                    url: '/dajsCx',
                                    contentType: "application/json; charset=UTF-8",
                                    type: "GET",
                                    dataType: 'json',
                                    queryParamsType: "",
                                    sortName : 'sqsj',
                                    sortOrder : 'desc',
                                    singleSelect: false,
                                    striped: true,
                                    smartDisplay: false,
                                    cache: false,
                                    pagination: true,  //设置为 true 会在表格底部显示分页条。
                                    paginationLoop: false, //设置为 true 启用分页条无限循环的功能。
                                    pageSize: 10,//每页初始显示的条数
                                    pageList: [10],
                                    toolbar: "#addtool",
                                    sidePagination: 'server',
                                    showJumpto: true,
                                    queryParams: function (params) {
                                        vue.$data.sort = params.sortOrder;
                                        vue.$data.jyxx2.dalx = vue.$data.zt;
                                        return {
                                            'pageNum':params.pageNumber,
                                            'pageSize':params.pageSize,
                                            'wdlx':vue.$data.zt,
                                            'keyword':vue.$data.keyword,
                                            'sort':params.sortOrder,
                                        };
                                    },
                                    toolbar: "#addtool",
                                    columns: [
                                        {
                                            checkbox:true,
                                        },{
                                            field: 'id',
                                            title: '序号',
                                            sortable : true,
                                            formatter:paramsMatter
                                        },
                                        {
                                            field: 'dabh',
                                            title: '档案编号',
                                            formatter:paramsMatter
                                        },
                                        {
                                            field: 'ajtm',
                                            title: '案卷题名',
                                            formatter:paramsMatter
                                        },
                                        {
                                            field: 'dtslbh',
                                            title: '大厅受理编号',
                                            formatter:paramsMatter
                                        },
                                        {
                                            field: 'cz',
                                            title: '操作',
                                            formatter: function (value, row, index) {
                                                if (vue.$data.role == 1 || vue.$data.role == 2) {
                                                    var str = "<a href='javascript:jydj(\""+row.dabh+"\",\""+row.ajtm+"\",\""+row.typeName+"\",\""+row.typeId+"\","+row.id+")' style='color: #2770E8'>借阅登记</a>";
                                                    return str;
                                                } else {
                                                    var str = "<a href='javascript:jysq(\""+row.dabh+"\",\""+row.ajtm+"\",\""+row.typeName+"\",\""+row.typeId+"\")' style='color: #2770E8'>借阅申请</a>";
                                                    return str;
                                                }

                                            }
                                        }],
                                    responseHandler: function (res) {  //后台返回的结果
                                        if (res.code == "200") {
                                            var data = res.data;
                                            var NewData = [];
                                            for (i = 0; i < data.data.length; i++) {
                                                NewData.push(data.data[i]);
                                            }
                                            var data = {
                                                rows: NewData,
                                                total: data.total
                                            };
                                            return data;
                                        }
                                    }
                                });
                            }else{
                                $("#userTable").bootstrapTable('destroy');
                                $('#userTable').bootstrapTable({
                                    url: '/dajsCx',
                                    contentType: "application/json; charset=UTF-8",
                                    type: "GET",
                                    dataType: 'json',
                                    queryParamsType: "",
                                    sortName : 'sqsj',
                                    sortOrder : 'desc',
                                    singleSelect: false,
                                    striped: true,
                                    smartDisplay: false,
                                    cache: false,
                                    pagination: true,  //设置为 true 会在表格底部显示分页条。
                                    paginationLoop: false, //设置为 true 启用分页条无限循环的功能。
                                    pageSize: 10,//每页初始显示的条数
                                    pageList: [10],
                                    toolbar: "#addtool",
                                    sidePagination: 'server',
                                    showJumpto: true,
                                    queryParams: function (params) {
                                        vue.$data.sort = params.sortOrder;
                                        vue.$data.jyxx2.dalx = vue.$data.zt;
                                        return {
                                            'pageNum':params.pageNumber,
                                            'pageSize':params.pageSize,
                                            'wdlx':vue.$data.zt,
                                            'keyword':vue.$data.keyword,
                                            'sort':params.sortOrder,
                                        };
                                    },
                                    toolbar: "#addtool",
                                    columns: [
                                        {
                                            checkbox:true,
                                        },{
                                            field: 'id',
                                            title: '序号',
                                            sortable : true,
                                            formatter:paramsMatter
                                        },
                                        {
                                            field: 'dabh',
                                            title: '档案编号',
                                            formatter:paramsMatter
                                        },
                                        {
                                            field: 'ajtm',
                                            title: '案卷题名',
                                            formatter:paramsMatter
                                        },
                                        {
                                            field: 'wh',
                                            title: '文号',
                                            formatter:paramsMatter
                                        },
                                        {
                                            field: 'cz',
                                            title: '操作',
                                            formatter: function (value, row, index) {
                                                if (vue.$data.role == 1 || vue.$data.role == 2) {
                                                    var str = "<a href='javascript:jydj(\""+row.dabh+"\",\""+row.ajtm+"\",\""+row.typeName+"\",\""+row.typeId+"\","+row.id+")' style='color: #2770E8'>借阅登记</a>";
                                                    return str;
                                                } else {
                                                    var str = "<a href='javascript:jysq(\""+row.dabh+"\",\""+row.ajtm+"\",\""+row.typeName+"\",\""+row.typeId+"\")' style='color: #2770E8'>借阅申请</a>";
                                                    return str;
                                                }

                                            }
                                        }],
                                    responseHandler: function (res) {  //后台返回的结果
                                        if (res.code == "200") {
                                            var data = res.data;
                                            var NewData = [];
                                            for (i = 0; i < data.data.length; i++) {
                                                NewData.push(data.data[i]);
                                            }
                                            var data = {
                                                rows: NewData,
                                                total: data.total
                                            };
                                            return data;
                                        }
                                    }
                                });
                            }
                        }else{
                            layer.close(myMsg);
                            $("#plForm").data('bootstrapValidator').resetForm();//清除当前验证的关键之处
                            // vue.$data.ids = [];
                            // vue.$data.pljy.dabhs = [];
                            cxAlert(data.mess);
                        }
                    })
                }
            },
            cancel:function(){
                $("#userForm").data('bootstrapValidator').resetForm();//清除当前验证的关键之处
                $('#jydaDiv2').modal('hide');
            },
            doSq:function(){
                var bootstrapValidator1 = $("#userForm").data('bootstrapValidator');
                bootstrapValidator1.validate();
                if(bootstrapValidator1.isValid()){
                    var myMsg = cxLoad("借阅中");
                    this.$http.post('/jy/api/daJy',this.jyxx2).then( function (result) {
                        var data = result.body;
                        if(data.code == 200){
                            layer.close(myMsg);
                            cxAlertOk("成功提交申请，请等待审核员审批");
                            $("#userForm").data('bootstrapValidator').resetForm();//清除当前验证的关键之处
                            $('#jydaDiv2').modal('hide');
                            $("#jyTable").bootstrapTable('destroy');
                            $('#jyTable').bootstrapTable({
                                url: '/jy/api/queryJy?zt=1',
                                contentType: "application/json; charset=UTF-8",
                                type: "GET",
                                dataType: 'json',
                                queryParamsType: "",
                                sortName : 'id',
                                sortOrder : 'desc',
                                singleSelect: true,
                                striped: true,
                                smartDisplay: false,
                                cache: false,
                                pagination: true,  //设置为 true 会在表格底部显示分页条。
                                paginationLoop: false, //设置为 true 启用分页条无限循环的功能。
                                pageSize: 10,//每页初始显示的条数
                                pageList: [10],
                                toolbar: "#addtool",
                                sidePagination: 'server',
                                queryParams: function (params) {
                                    return {'pageNum': params.pageNumber, 'pageSize': params.pageSize,'sort':params.sortOrder};
                                },
                                toolbar: "#addtool",
                                columns: [
                                    {
                                        field: 'id',
                                        title: '序号',
                                        formatter:paramsMatter
                                    },{
                                        field: 'dabh',
                                        title: '档案编号',
                                        formatter:paramsMatter
                                    },
                                    {
                                        field: 'ajtm',
                                        title: '案卷题名',
                                        formatter:paramsMatter
                                    },{
                                        field: 'jssj',
                                        title: '借阅结束时间',
                                        formatter:paramsMatter
                                    },
                                    {
                                        field: 'zt',
                                        title: '状态',
                                        formatter: function (value, row, index) {
                                            var str = "";
                                            if (value == 0) {
                                                str = "<span class='text-muted'><b>待审核</b></span>";
                                            } else if (value == 1) {
                                                str = "<span class='text-success'><b>审核通过</b></span>";
                                            } else if (value == 2) {
                                                str = "<span class='text-danger'><b>拒绝</b></span>";
                                            }else if (value == 3) {
                                                str = "<span class='text-primary'><b>已过期</b></span>";
                                            }
                                            return str;
                                        }
                                    },
                                    {
                                        field: 'cz',
                                        title: '操作',
                                        formatter: function (value, row, index) {
                                            if (row.zt == 1) {
                                                var str = "<a href='javascript:shJm(\"" + row.dalx +"\","+row.id+",\""+row.dabh+ "\")' style='color: #2770E8'>查看档案</a>";
                                                return str;
                                            } else {
                                                var str = "<a style='color: #2770E8'>查看档案</a>";
                                                return str;
                                            }

                                        }
                                    }],
                                responseHandler: function (res) {  //后台返回的结果
                                    if (res.code == "200") {
                                        var data = res.data;
                                        var NewData = [];
                                        for (i = 0; i < data.data.length; i++) {
                                            NewData.push(data.data[i]);
                                        }
                                        var data = {
                                            rows: NewData,
                                            total: data.total
                                        };
                                        return data;
                                    }
                                }
                            });
                        }else{
                            layer.close(myMsg);
                            $("#userForm").data('bootstrapValidator').resetForm();//清除当前验证的关键之处
                            cxAlert(data.mess);

                        }
                    })
                }
            },
            shrChange:function(){
                var shr = this.allShy.findIndex(item => item.id === this.jyxx.shrId);
                //this.jyxx.shrLxdh = this.allShy[shr].phone;
            },

            cz:function () {
                if(isKj(this.zt)){
                    $("#userTable").bootstrapTable('destroy');
                    $('#userTable').bootstrapTable({
                        url: '/dajsCx',
                        contentType: "application/json; charset=UTF-8",
                        type: "GET",
                        dataType: 'json',
                        queryParamsType: "",
                        sortName : 'sqsj',
                        sortOrder : 'desc',
                        singleSelect: false,
                        striped: true,
                        smartDisplay: false,
                        cache: false,
                        pagination: true,  //设置为 true 会在表格底部显示分页条。
                        paginationLoop: false, //设置为 true 启用分页条无限循环的功能。
                        pageSize: 10,//每页初始显示的条数
                        pageList: [10],
                        toolbar: "#addtool",
                        sidePagination: 'server',
                        showJumpto: true,
                        queryParams: function (params) {
                            vue.$data.sort = params.sortOrder;
                            vue.$data.jyxx2.dalx = vue.$data.zt;
                            return {
                                'pageNum':params.pageNumber,
                                'pageSize':params.pageSize,
                                'wdlx':vue.$data.zt,
                                'keyword':vue.$data.keyword,
                                'sort':params.sortOrder,
                            };
                        },
                        toolbar: "#addtool",
                        columns: [
                            {
                                checkbox:true,
                            },{
                                field: 'id',
                                title: '序号',
                                sortable : true,
                                formatter:paramsMatter
                            },
                            {
                                field: 'dabh',
                                title: '档案编号',
                                formatter:paramsMatter
                            },
                            {
                                field: 'ajtm',
                                title: '案卷题名',
                                formatter:paramsMatter
                            },
                            {
                                field: 'dtslbh',
                                title: '大厅受理编号',
                                formatter:paramsMatter
                            },
                            {
                                field: 'cz',
                                title: '操作',
                                formatter: function (value, row, index) {
                                    if (vue.$data.role == 1 || vue.$data.role == 2) {
                                        var str = "<a href='javascript:jydj(\""+row.dabh+"\",\""+row.ajtm+"\",\""+row.typeName+"\",\""+row.typeId+"\","+row.id+")' style='color: #2770E8'>借阅登记</a>";
                                        return str;
                                    } else {
                                        var str = "<a href='javascript:jysq(\""+row.dabh+"\",\""+row.ajtm+"\",\""+row.typeName+"\",\""+row.typeId+"\")' style='color: #2770E8'>借阅申请</a>";
                                        return str;
                                    }

                                }
                            }],
                        responseHandler: function (res) {  //后台返回的结果
                            if (res.code == "200") {
                                var data = res.data;
                                var NewData = [];
                                for (i = 0; i < data.data.length; i++) {
                                    NewData.push(data.data[i]);
                                }
                                var data = {
                                    rows: NewData,
                                    total: data.total
                                };
                                return data;
                            }
                        }
                    });
                }else{
                    $("#userTable").bootstrapTable('destroy');
                    $('#userTable').bootstrapTable({
                        url: '/dajsCx',
                        contentType: "application/json; charset=UTF-8",
                        type: "GET",
                        dataType: 'json',
                        queryParamsType: "",
                        sortName : 'sqsj',
                        sortOrder : 'desc',
                        singleSelect: false,
                        striped: true,
                        smartDisplay: false,
                        cache: false,
                        pagination: true,  //设置为 true 会在表格底部显示分页条。
                        paginationLoop: false, //设置为 true 启用分页条无限循环的功能。
                        pageSize: 10,//每页初始显示的条数
                        pageList: [10],
                        toolbar: "#addtool",
                        sidePagination: 'server',
                        showJumpto: true,
                        queryParams: function (params) {
                            vue.$data.sort = params.sortOrder;
                            vue.$data.jyxx2.dalx = vue.$data.zt;
                            return {
                                'pageNum':params.pageNumber,
                                'pageSize':params.pageSize,
                                'wdlx':vue.$data.zt,
                                'keyword':vue.$data.keyword,
                                'sort':params.sortOrder,
                            };
                        },
                        toolbar: "#addtool",
                        columns: [
                            {
                                checkbox:true,
                            },{
                                field: 'id',
                                title: '序号',
                                sortable : true,
                                formatter:paramsMatter
                            },
                            {
                                field: 'dabh',
                                title: '档案编号',
                                formatter:paramsMatter
                            },
                            {
                                field: 'ajtm',
                                title: '案卷题名',
                                formatter:paramsMatter
                            },
                            {
                                field: 'wh',
                                title: '文号',
                                formatter:paramsMatter
                            },
                            {
                                field: 'cz',
                                title: '操作',
                                formatter: function (value, row, index) {
                                    if (vue.$data.role == 1 || vue.$data.role == 2) {
                                        var str = "<a href='javascript:jydj(\""+row.dabh+"\",\""+row.ajtm+"\",\""+row.typeName+"\",\""+row.typeId+"\","+row.id+")' style='color: #2770E8'>借阅登记</a>";
                                        return str;
                                    } else {
                                        var str = "<a href='javascript:jysq(\""+row.dabh+"\",\""+row.ajtm+"\",\""+row.typeName+"\",\""+row.typeId+"\")' style='color: #2770E8'>借阅申请</a>";
                                        return str;
                                    }

                                }
                            }],
                        responseHandler: function (res) {  //后台返回的结果
                            if (res.code == "200") {
                                var data = res.data;
                                var NewData = [];
                                for (i = 0; i < data.data.length; i++) {
                                    NewData.push(data.data[i]);
                                }
                                var data = {
                                    rows: NewData,
                                    total: data.total
                                };
                                return data;
                            }
                        }
                    });
                }

            },
        },
        created: function () {
            this.$http.get('/dagl/api/queryAllLx').then( function (result) {
                var data = result.body;
                if(data.code == 200){
                    this.allLx = data.data;
                }else{
                    cxAlert(data.mess);
                }
            })
            $.get('/getUser').then( function (result) {
                var data = result.data;
                if(result.code == 200){
                    vue.$data.role = data.roleId;
                    vue.$data.jyxx2.jyr = data.name;
                    vue.$data.pljy.jyr = data.name;
                    //console.log(vue.$data.role);
                }
            });
            this.$http.get('/listShUser').then( function (result) {
                var data = result.body;
                if(data.code == 200){
                    this.allShy = data.data;
                    if(data.data.length == 0){
                        cxAlert("尚未添加审核人，请先添加审核人");
                    }else {
                        vue.$data.jyxx2.shrId = data.data[0].id;
                        vue.$data.jyxx2.shr = data.data[0].account;
                    }
                }else{
                    cxAlert(data.mess);
                }
            })
        },
        mounted: function () {
            try {
                top.activeTabByPageId(19001111);
                top.closeTabByPageId(19001111);
                top.activeTabByPageId(7777);
            }catch (e) {
                try {
                    top.activeTabByPageId(190011111);
                    top.closeTabByPageId(190011111);
                    top.activeTabByPageId(7777);
                }catch (e) {
                    try {
                        top.activeTabByPageId(19001112);
                        top.closeTabByPageId(19001112);
                        top.activeTabByPageId(7777);
                    }catch (e) {
                        top.activeTabByPageId(7777);
                    }
                }
            }
            var that = this;
            var url = location.search;
            url = decodeURI(url);
            if(url != ''){
                if(url.indexOf('dalxName') != -1){
                    var wdlxName = url.substring(url.indexOf('wdlxName=')+9,url.indexOf('&keyword'));
                    var dalxShow = url.substring(url.indexOf('dalxShow=')+9,url.indexOf('&wdlxId'));
                    var keyword = url.substring(url.indexOf('keyword=')+8,url.indexOf('&dalxShow'));
                    var wdlxId = url.substring(url.indexOf('wdlxId=')+7,url.indexOf('&dalxId'));
                    var dalxId = url.substring(url.indexOf('dalxId=')+7,url.indexOf('&root'));
                    var root = url.substring(url.indexOf('root=')+5,url.indexOf('&dalxName'));
                    var dalxname = url.substring(url.indexOf('dalxName=')+9);
                    if(wdlxName != "null"){
                        that.wdlxName = wdlxName;
                    }
                    if(keyword != "null"){
                        that.keyword = keyword;
                    }
                    wdlxIds.push(wdlxId);
                    that.dalxShow = false;
                    that.zt = dalxId;
                    that.root = root;
                    dalxName = dalxname;
                    if(dalxname === "个人用房"){
                        that.isGryf = true;
                    }else{
                        that.isGryf = false;
                    }
                    that.pljy.dalxId = that.zt;
                    that.startShow = false;
                    that.mainShow = true;
                    var url2;
                    if(this.keyword == null){
                        url2 = '/dajsCx';
                    }else {
                        url2 = '/dajsCx?keyword='+that.keyword;
                    }
                    if(that.isGryf){
                        $("#userTable").bootstrapTable('destroy');
                        $('#userTable').bootstrapTable({
                            url: url2,
                            contentType: "application/json; charset=UTF-8",
                            type: "GET",
                            dataType: 'json',
                            queryParamsType: "",
                            sortName : 'id',
                            sortOrder : 'desc',
                            singleSelect: true,
                            striped: true,
                            smartDisplay: false,
                            cache: false,
                            pagination:true,  //设置为 true 会在表格底部显示分页条。
                            paginationLoop:false, //设置为 true 启用分页条无限循环的功能。
                            pageSize:20,//每页初始显示的条数
                            pageList:[5,10],
                            toolbar: "#addtool",
                            sidePagination: 'server',
                            showJumpto: true,
                            queryParams: function (params) {
                                that.sort = params.sortOrder;
                                return {
                                    'pageNum':params.pageNumber,
                                    'pageSize':params.pageSize,
                                    'wdlx':that.zt,
                                    'sort':params.sortOrder,
                                };
                            },
                            columns: [{
                                field: 'id',
                                title: '顺序号',
                                sortable : true,
                                formatter:paramsMatter
                            },{
                                field: 'dabh',
                                title: '档案编号',
                                formatter:paramsMatter
                            }, {
                                field: 'townBsc',
                                title: '镇/办事处',
                                formatter:paramsMatter
                            },{
                                field: 'villageJwh',
                                title: '村/居委会',
                                formatter:paramsMatter
                            }, {
                                field: 'zhh',
                                title: '案卷题名',
                                formatter:paramsMatter
                            }, {
                                field: 'sqcl',
                                title: '申请材料',
                                formatter:paramsMatter
                            },{
                                field: 'cz',
                                title: '操作',
                                formatter: function (value, row, index) {
                                    if (vue.$data.role == 1 || vue.$data.role == 2) {
                                        var str = "<a href='javascript:gryfjydj(\""+row.dabh+"\",\""+row.zhh+"\")' style='color: #2770E8'>借阅登记</a>";
                                        return str;
                                    } else {
                                        var str = "<a href='javascript:gryfjysq(\""+row.dabh+"\",\""+row.zhh+"\")' style='color: #2770E8'>借阅申请</a>";
                                        return str;
                                    }

                                }
                            }],
                            responseHandler: function (res) {  //后台返回的结果
                                if (res.code == "200") {
                                    var data = res.data;
                                    var NewData = [];
                                    for(var i=0;i<data.data.length;i++){
                                        NewData.push(data.data[i]);
                                    }
                                    var data = {
                                        rows: NewData,
                                        total:data.total
                                    };
                                    return data;
                                }
                            }
                        });
                    }else {
                        if(that.root === "科技"){
                            $("#userTable").bootstrapTable('destroy');
                            $('#userTable').bootstrapTable({
                                url: url2,
                                contentType: "application/json; charset=UTF-8",
                                type: "GET",
                                dataType: 'json',
                                queryParamsType: "",
                                sortName : 'sqsj',
                                sortOrder : 'desc',
                                singleSelect: false,
                                striped: true,
                                smartDisplay: false,
                                cache: false,
                                pagination: true,  //设置为 true 会在表格底部显示分页条。
                                paginationLoop: false, //设置为 true 启用分页条无限循环的功能。
                                pageSize: 10,//每页初始显示的条数
                                pageList: [10],
                                toolbar: "#addtool",
                                sidePagination: 'server',
                                showJumpto: true,
                                queryParams: function (params) {
                                    that.sort = params.sortOrder;
                                    that.jyxx2.dalx = that.zt;
                                    return {
                                        'pageNum':params.pageNumber,
                                        'pageSize':params.pageSize,
                                        'wdlx':that.zt,
                                        'sort':params.sortOrder,
                                    };
                                },
                                toolbar: "#addtool",
                                columns: [
                                    {
                                        checkbox:true,
                                    },{
                                        field: 'id',
                                        title: '序号',
                                        sortable : true,
                                        formatter:paramsMatter
                                    },
                                    {
                                        field: 'dabh',
                                        title: '档案编号',
                                        formatter:paramsMatter
                                    },
                                    {
                                        field: 'ajtm',
                                        title: '案卷题名',
                                        formatter:paramsMatter
                                    },
                                    {
                                        field: 'dtslbh',
                                        title: '大厅受理编号',
                                        formatter:paramsMatter
                                    },
                                    {
                                        field: 'cz',
                                        title: '操作',
                                        formatter: function (value, row, index) {
                                            if (vue.$data.role == 1 || vue.$data.role == 2) {
                                                var str = "<a href='javascript:jydj(\""+row.dabh+"\",\""+row.ajtm+"\",\""+row.typeName+"\",\""+row.typeId+"\","+row.id+")' style='color: #2770E8'>借阅登记</a>";
                                                return str;
                                            } else {
                                                var str = "<a href='javascript:jysq(\""+row.dabh+"\",\""+row.ajtm+"\",\""+row.typeName+"\",\""+row.typeId+"\")' style='color: #2770E8'>借阅申请</a>";
                                                return str;
                                            }

                                        }
                                    }],
                                responseHandler: function (res) {  //后台返回的结果
                                    if (res.code == "200") {
                                        var data = res.data;
                                        var NewData = [];
                                        for (i = 0; i < data.data.length; i++) {
                                            NewData.push(data.data[i]);
                                        }
                                        var data = {
                                            rows: NewData,
                                            total: data.total
                                        };
                                        return data;
                                    }
                                }
                            });
                        }else{
                            $("#userTable").bootstrapTable('destroy');
                            $('#userTable').bootstrapTable({
                                url: url2,
                                contentType: "application/json; charset=UTF-8",
                                type: "GET",
                                dataType: 'json',
                                queryParamsType: "",
                                sortName : 'sqsj',
                                sortOrder : 'desc',
                                singleSelect: false,
                                striped: true,
                                smartDisplay: false,
                                cache: false,
                                pagination: true,  //设置为 true 会在表格底部显示分页条。
                                paginationLoop: false, //设置为 true 启用分页条无限循环的功能。
                                pageSize: 10,//每页初始显示的条数
                                pageList: [10],
                                toolbar: "#addtool",
                                sidePagination: 'server',
                                showJumpto: true,
                                queryParams: function (params) {
                                    that.sort = params.sortOrder;
                                    that.jyxx2.dalx = that.zt;
                                    return {
                                        'pageNum':params.pageNumber,
                                        'pageSize':params.pageSize,
                                        'wdlx':that.zt,
                                        'sort':params.sortOrder,
                                    };
                                },
                                toolbar: "#addtool",
                                columns: [
                                    {
                                        checkbox:true,
                                    },{
                                        field: 'id',
                                        title: '序号',
                                        sortable : true,
                                        formatter:paramsMatter
                                    },
                                    {
                                        field: 'dabh',
                                        title: '档案编号',
                                        formatter:paramsMatter
                                    },
                                    {
                                        field: 'ajtm',
                                        title: '案卷题名',
                                        formatter:paramsMatter
                                    },
                                    {
                                        field: 'wh',
                                        title: '文号',
                                        formatter:paramsMatter
                                    },
                                    {
                                        field: 'cz',
                                        title: '操作',
                                        formatter: function (value, row, index) {
                                            if (vue.$data.role == 1 || vue.$data.role == 2) {
                                                var str = "<a href='javascript:jydj(\""+row.dabh+"\",\""+row.ajtm+"\",\""+row.typeName+"\",\""+row.typeId+"\","+row.id+")' style='color: #2770E8'>借阅登记</a>";
                                                return str;
                                            } else {
                                                var str = "<a href='javascript:jysq(\""+row.dabh+"\",\""+row.ajtm+"\",\""+row.typeName+"\",\""+row.typeId+"\")' style='color: #2770E8'>借阅申请</a>";
                                                return str;
                                            }

                                        }
                                    }],
                                responseHandler: function (res) {  //后台返回的结果
                                    if (res.code == "200") {
                                        var data = res.data;
                                        var NewData = [];
                                        for (i = 0; i < data.data.length; i++) {
                                            NewData.push(data.data[i]);
                                        }
                                        var data = {
                                            rows: NewData,
                                            total: data.total
                                        };
                                        return data;
                                    }
                                }
                            });
                        }
                    }
                }else {
                    var type = url.substring(url.indexOf('=')+1,url.indexOf('&'));
                    var wdlxName = url.substring(url.indexOf('wdlxName=')+9,url.indexOf('&keyword'));
                    var dalxShow = url.substring(url.indexOf('dalxShow=')+9,url.indexOf('&wdlxId'));
                    var keyword = url.substring(url.indexOf('keyword=')+8,url.indexOf('&dalxShow'));
                    var wdlxId = url.substring(url.indexOf('wdlxId=')+7);
                    if(wdlxName != "null"){
                        that.wdlxName = wdlxName;
                    }
                    if(keyword != "null"){
                        that.keyword = keyword;
                    }
                    wdlxIds.push(wdlxId);
                    if(that.dalxShow){
                        that.searchDalx();
                    }else {
                        that.cz();
                    }
                }
            }
            $('#userTable').on('check-all.bs.table', function (rowsAfter,rowsBefore) {
                var isPush = true;
                //vue.$data.pljy.dalxId = rowsBefore[0].dalxId;
                if(vue.$data.ids.length == 0){
                    for(var i = 0; i < rowsBefore.length;i++){
                        vue.$data.ids[i] = rowsBefore[i].dabh;
                    }
                }
                for(var z = 0;z<rowsBefore.length;z++){
                    for(var a = 0;a < vue.$data.ids.length;a++){
                        if(rowsBefore[z].dabh ==vue.$data.ids[a]){
                            vue.$data.ids[a] = rowsBefore[z].dabh;
                            isPush = false;
                            break;
                        }
                    }
                    if(isPush){
                        vue.$data.ids.push(rowsBefore[z].dabh);
                    }

                }

            });
            $('#userTable').on('uncheck-all.bs.table', function (e,rowsAfter,rowsBefore) {
                if (vue.$data.ids.length > 0) {
                    var list = [].concat(vue.$data.ids);
                    for(var e = 0;e < list.length;e++){
                        for(var c = 0;c<rowsBefore.length;c++){
                            if (vue.$data.ids[0] != undefined && rowsBefore[c].dabh == list[e]) {
                                vue.$data.ids.splice(vue.$data.ids.indexOf(list[e]),1);  // 删除元素并已undefined代替（方法固有）
                            }
                        }
                    }
                }
            });
            $('#userTable').on('check.bs.table', function (e, row) {
                if (row != undefined) {
                    //vue.$data.pljy.dalxId = row.dalxId;
                    vue.$data.ids.push(row.dabh);
                }
            });
            // 取消选中行时触发
            $('#userTable').on('uncheck.bs.table', function (e, row) {
                if (row != undefined) {
                    if (vue.$data.ids.length > 0) {
                        for(var m = 0;m<vue.$data.ids.length;m++){
                            if (vue.$data.ids[m] != undefined && row.dabh == vue.$data.ids[m]) {
                                vue.$data.ids.splice(m,1); // 删除元素并已undefined代替（方法固有）
                            }
                        }
                    }
                }
            });

            $("#jyTable").bootstrapTable('destroy');
            $('#jyTable').bootstrapTable({
                url: '/jy/api/queryJy?zt=1',
                contentType: "application/json; charset=UTF-8",
                type: "GET",
                dataType: 'json',
                queryParamsType: "",
                sortName : 'id',
                sortOrder : 'desc',
                singleSelect: true,
                striped: true,
                smartDisplay: false,
                cache: false,
                pagination: true,  //设置为 true 会在表格底部显示分页条。
                paginationLoop: false, //设置为 true 启用分页条无限循环的功能。
                pageSize: 10,//每页初始显示的条数
                pageList: [10],
                toolbar: "#addtool",
                sidePagination: 'server',
                queryParams: function (params) {
                    return {'pageNum': params.pageNumber, 'pageSize': params.pageSize,'sort':params.sortOrder};
                },
                toolbar: "#addtool",
                columns: [
                    {
                        field: 'id',
                        title: '序号',
                        sortable : true,
                        formatter:paramsMatter
                    },{
                        field: 'dabh',
                        title: '档案编号',
                        formatter:paramsMatter
                    },
                    {
                        field: 'ajtm',
                        title: '案卷题名',
                        formatter:paramsMatter
                    },{
                        field: 'jssj',
                        title: '借阅结束时间',
                        formatter:paramsMatter
                    },
                    {
                        field: 'zt',
                        title: '状态',
                        formatter: function (value, row, index) {
                            var str = "";
                            if (value == 0) {
                                str = "<span class='text-muted'><b>待审核</b></span>";
                            } else if (value == 1) {
                                str = "<span class='text-success'><b>审核通过</b></span>";
                            } else if (value == 2) {
                                str = "<span class='text-danger'><b>拒绝</b></span>";
                            }else if (value == 3) {
                                str = "<span class='text-primary'><b>已过期</b></span>";
                            }
                            return str;
                        }
                    },
                    {
                        field: 'cz',
                        title: '操作',
                        formatter: function (value, row, index) {
                            if (row.zt == 1) {
                                var str = "<a href='javascript:shJm(\"" + row.dalx +"\","+row.id+",\""+row.dabh+ "\")' style='color: #2770E8'>查看档案</a>";
                                return str;
                            } else {
                                var str = "<a style='color: #2770E8'>查看档案</a>";
                                return str;
                            }

                        }
                    }],
                responseHandler: function (res) {  //后台返回的结果
                    if (res.code == "200") {
                        var data = res.data;
                        var NewData = [];
                        for (i = 0; i < data.data.length; i++) {
                            NewData.push(data.data[i]);
                        }
                        var data = {
                            rows: NewData,
                            total: data.total
                        };
                        return data;
                    }
                }
            });

            $('#userForm').bootstrapValidator({
                feedbackIcons: {
                    valid: 'glyphicon glyphicon-ok',
                    invalid: 'glyphicon glyphicon-remove',
                    validating: 'glyphicon glyphicon-refresh'
                },
                fields: {
                    jyr: {
                        validators: {
                            notEmpty: {
                                message: '借阅人不能为空'
                            },
                        }
                    },
                    jysx: {
                        validators: {
                            notEmpty: {
                                message: '借阅时限不能为空'
                            },
                        }
                    },
                    shr: {
                        validators: {
                            notEmpty: {
                                message: '审核人不能为空'
                            },
                        }
                    },jyyy: {
                        validators: {
                            notEmpty: {
                                message: '借阅原因不能为空'
                            },
                            stringLength: {
                                max: 100,
                                message: '借阅原因字段长度不能超过100'
                            }
                        }
                    }
                }
            });

            $('#plForm').bootstrapValidator({
                feedbackIcons: {
                    valid: 'glyphicon glyphicon-ok',
                    invalid: 'glyphicon glyphicon-remove',
                    validating: 'glyphicon glyphicon-refresh'
                },
                fields: {
                    jyr: {
                        validators: {
                            notEmpty: {
                                message: '借阅人不能为空'
                            },
                        }
                    },
                    jysx: {
                        validators: {
                            notEmpty: {
                                message: '借阅时限不能为空'
                            },
                        }
                    },
                    shr: {
                        validators: {
                            notEmpty: {
                                message: '审核人不能为空'
                            },
                        }
                    },jyyy: {
                        validators: {
                            notEmpty: {
                                message: '借阅原因不能为空'
                            },
                            stringLength: {
                                max: 100,
                                message: '借阅原因字段长度不能超过100'
                            }
                        }
                    }
                }
            });

            this.$http.get('/dagl/api/queryDalx').then( function (result) {
                var data = result.body;
                if(data.code == 200){
                    //that.searchDalx();
                    $("#dalxTable").bootstrapTable('destroy');
                    $('#dalxTable').bootstrapTable({
                        url: '',
                        contentType: "application/json; charset=UTF-8",
                        type: "GET",
                        dataType: 'json',
                        queryParamsType: "",
                        singleSelect: true,
                        striped: true,
                        smartDisplay: false,
                        cache: false,
                        //pagination:true,  //设置为 true 会在表格底部显示分页条。
                        paginationLoop:false, //设置为 true 启用分页条无限循环的功能。
                        pageSize:20,//每页初始显示的条数
                        pageList:[5,10],
                        toolbar: "#addtool",
                        sidePagination: 'server',
                        queryParams: function (params) {
                            return {
                                'pageNum':params.pageNumber,
                                'pageSize':params.pageSize,
                            };
                        },
                        columns: [{
                            field: 'id',
                            title: '序号',
                            sortable : true,
                            formatter:serialNumber
                        },{
                            field: 'root',
                            title: '主要类型',
                            formatter:paramsMatter
                        }, {
                            field: 'dalx',
                            title: '详细类型',
                            formatter:paramsMatter
                        },{
                            field: 'number',
                            title: '查询结果',
                            formatter:paramsMatter
                        }
                            ,{
                                field: 'cz',
                                title: '操作',
                                formatter: function (value, row, index) {
                                    //let sj = {"dabh":row.dabh,"typeId":row.typeId};
                                    return '<a style="color: #2C72E8;font-size: 16px" href="javascript:ck('+row.dalxId+',\''+row.root+'\',\''+row.dalx+'\')">查看</a>'
                                }
                            }
                        ],
                        responseHandler: function (res) {  //后台返回的结果
                            if (res.code == "200") {
                                var data = res.data;
                                var NewData = [];

                                var data = {
                                    rows: NewData,
                                    total:data.total
                                };
                                return data;
                            }
                        }
                    });
                    var nodes = data.data[0].nodes;
                    getkjAndws(data.data);
                    that.zt = that.kj;
                    that.pljy.dalxId = that.zt;
                    that.jyxx2.dalx = that.zt;
                    $("#userTable").bootstrapTable('destroy');
                    $('#userTable').bootstrapTable({
                        url: '/dajsCx',
                        contentType: "application/json; charset=UTF-8",
                        type: "GET",
                        dataType: 'json',
                        queryParamsType: "",
                        sortName : 'sqsj',
                        sortOrder : 'desc',
                        singleSelect: false,
                        striped: true,
                        smartDisplay: false,
                        cache: false,
                        pagination: true,  //设置为 true 会在表格底部显示分页条。
                        paginationLoop: false, //设置为 true 启用分页条无限循环的功能。
                        pageSize: 10,//每页初始显示的条数
                        pageList: [10],
                        toolbar: "#addtool",
                        sidePagination: 'server',
                        showJumpto: true,
                        queryParams: function (params) {
                            this.sort = params.sortOrder;
                            return {
                                'pageNum':params.pageNumber,
                                'pageSize':params.pageSize,
                                'wdlx':vue.$data.zt,
                                'keyword':vue.$data.keyword,
                                'sort':params.sortOrder,
                            };
                        },
                        toolbar: "#addtool",
                        columns: [
                            {
                                checkbox:true,
                            },{
                                field: 'id',
                                title: '序号',
                                sortable : true,
                                formatter:paramsMatter
                            },
                            {
                                field: 'dabh',
                                title: '档案编号',
                                formatter:paramsMatter
                            },
                            {
                                field: 'ajtm',
                                title: '案卷题名',
                                formatter:paramsMatter
                            },
                            {
                                field: 'dtslbh',
                                title: '大厅受理编号',
                                formatter:paramsMatter
                            },
                            {
                                field: 'cz',
                                title: '操作',
                                formatter: function (value, row, index) {
                                    if (that.role == 1 || that.role == 2) {
                                        var str = "<a href='javascript:jydj(\""+row.dabh+"\",\""+row.ajtm+"\",\""+row.typeName+"\",\""+row.typeId+"\","+row.id+")' style='color: #2770E8'>借阅登记</a>";
                                        return str;
                                    } else {
                                        var str = "<a href='javascript:jysq(\""+row.dabh+"\",\""+row.ajtm+"\",\""+row.typeName+"\",\""+row.typeId+"\")' style='color: #2770E8'>借阅申请</a>";
                                        return str;
                                    }

                                }
                            }],
                        responseHandler: function (res) {  //后台返回的结果
                            if (res.code == "200") {
                                var data = res.data;
                                var NewData = [];
                                for (i = 0; i < data.data.length; i++) {
                                    NewData.push(data.data[i]);
                                }
                                var data = {
                                    rows: NewData,
                                    total: data.total
                                };
                                return data;
                            }
                        }
                    });
                    $('#dalxTree').treeview({
                        color: "#428bca",
                        collapseIcon: "glyphicon glyphicon-minus",//可收缩的节点图标
                        // nodeIcon: "glyphicon glyphicon-user",
                        emptyIcon: "glyphicon glyphicon-file",//设置列表树中没有子节点的节点的图标
                        expandIcon: "glyphicon glyphicon-plus",  //设置列表上中有子节点的图标
                        highlightSearchResults:true,//是否高亮搜索结果 默认true
                        highlightSelected:false,     //是否选中高亮显示
                        onhoverColor: "#f5f5f5",    //鼠标滑过的颜色
                        levels: getCj(data.data) ,                 //设置初始化展开几级菜单 默认为2
                        //selectedIcon: 'glyphicon glyphicon-tint',
                        showBorder:true,                //是否显示边框
                        showCheckbox:true,              //是否显示多选框
                        data:nodes,
                        showTags:true,
                        onNodeSelected:function(event, data) {

                        },
                        onNodeChecked: function (event,node) {
                            var id = node.id;
                            var kjNodes = nodes[0];
                            var kjId = kjNodes.id;
                            var wsNodes = nodes[1];
                            var wsId = wsNodes.id;
                            for(var j = 0;j <kjNodes.nodes.length;j++){
                                if(kjNodes.nodes[j].id === id){
                                    for(var k = 0;k <wdlxIds.length;k++){
                                        if(kjId === wdlxIds[k]){
                                            wdlxIds.splice(k,1);
                                            break;
                                        }
                                    }
                                    $('#dalxTree').treeview('uncheckNode', 0, {
                                        silent: true
                                    });
                                    break;
                                }
                            }
                            for(var m = 0;m <wsNodes.nodes.length;m++){
                                if(wsNodes.nodes[m].id === id){
                                    for(var n = 0;n <wdlxIds.length;n++){
                                        if(wsId === wdlxIds[n]){
                                            wdlxIds.splice(n,1);
                                            break;
                                        }
                                    }
                                    $('#dalxTree').treeview('uncheckNode', 6, {
                                        silent: true
                                    });
                                    break;
                                }
                            }
                            wdlxIds.push(id);
                            that.searchDalx();
                        },
                        onNodeUnchecked: function (event,node) {
                            var text = node.text;
                            var id = node.id;
                            for(var i = 0;i <wdlxIds.length;i++){
                                if(id === wdlxIds[i]){
                                    wdlxIds.splice(i,1);
                                    break;
                                }
                            }
                            if(!(text === "科技档案" || text === "文书档案")){
                                that.searchDalx();
                            }
                        },
                    });
                }else{
                    cxAlert(data.mess);
                }
            })

        }
    });


</script>

</body>
</html>
